From 6a9fcd338b28fe76cb980867632068dd2bec533c Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Wed, 3 Mar 2010 15:50:50 +1000 Subject: Improvements to catch, return, signal, try Improve the ability to rethrow errors * Allow return to rethrow an error by accepting '-errorinfo stacktrace' * Also, 'catch ... opts' now also stores opts(-errorinfo) on error * Use these to provide better stack traces from 'case' and 'try' * Implement 'return -level' Make try/on/finally more Tcl 8.6 compatible * With support for 'on' handlers and docs Add support for catch options to try * Otherwise it's hard to use try to catch signals Improvements to signal handling * catch -signal now sets a list of the handled signals as the result * catch -signal won't execute the body at all if a handled signal is pending * up to 64 (jim_wide) signals can now be handled * if catch -signal is nested, the innermost catch will catch the error * new 'signal catch' allows ignored/blocked signals to be examined and cleared. * update docs on signal handling exec should indicate which signal killed the child Signed-off-by: Steve Bennett --- tests/stacktrace.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/stacktrace.test') diff --git a/tests/stacktrace.test b/tests/stacktrace.test index 5a1ce0a..91dccbe 100644 --- a/tests/stacktrace.test +++ b/tests/stacktrace.test @@ -15,7 +15,7 @@ proc main {} { } test err-$id1.$id2 "Stacktrace on error type $type, method $method" { set rc [catch {error_caller $type $method} msg] - #puts stderr "err-$id1.$id2 $type, $method\n[errorInfo $msg]\n" + #puts "\n-----------------\n$type, $method\n[errorInfo $msg]\n\n" if {$::SHOW_EXPECTED} { puts stderr "\terr-$id1.$id2 {[list $rc $msg [info stacktrace]]}" } list $rc $msg [info stacktrace] -- cgit v1.1