diff options
author | Steve Bennett <steveb@workware.net.au> | 2010-01-27 14:19:00 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2010-10-15 11:02:46 +1000 |
commit | cf077dff22b3c9ca0c528fd64e1392971e2d6027 (patch) | |
tree | 084df123c747d4ca4212f27274b78982ff9c1095 /tests/errors.tcl | |
parent | 8ca4eb0a1561cdd3ccd92d797cc744b6f8b0ea8d (diff) | |
download | jimtcl-cf077dff22b3c9ca0c528fd64e1392971e2d6027.zip jimtcl-cf077dff22b3c9ca0c528fd64e1392971e2d6027.tar.gz jimtcl-cf077dff22b3c9ca0c528fd64e1392971e2d6027.tar.bz2 |
Improve stack trace handling
*: Get rid of JIM_ERR_ADDSTACK and use interp->addStackTrace instead
*: 'return -code error' doesn't add a stack frame
*: Rename _file_copy to {file copy} for better error messages
*: Use 'return -code' to prevent excessive levels in the stack trace
Also rename info_nameofexecutable to {info nameofexecutable}
Diffstat (limited to 'tests/errors.tcl')
-rw-r--r-- | tests/errors.tcl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/errors.tcl b/tests/errors.tcl index a544faf..7f5cdc8 100644 --- a/tests/errors.tcl +++ b/tests/errors.tcl @@ -26,6 +26,9 @@ proc error_generator {type} { badpackage { package require bogus } \ + returncode { + return -code error failure + } \ default { puts "Unknown type=$type" } @@ -34,9 +37,6 @@ proc error_generator {type} { - - - # line 40: Some empty lines above so that line numbers don't change proc error_caller {type {method call}} { switch $method \ |