Index: library/lib/test.tcl =================================================================== diff -u -r7045595af282428ca760d1d5f9351d561a43bb51 -r16494e7f90f6b80bea8eacb3d018f1383651904b --- library/lib/test.tcl (.../test.tcl) (revision 7045595af282428ca760d1d5f9351d561a43bb51) +++ library/lib/test.tcl (.../test.tcl) (revision 16494e7f90f6b80bea8eacb3d018f1383651904b) @@ -120,10 +120,9 @@ # # Gracefully unwind the callstack built-up to this point, by # using [return]. At the top-most callstack level, we return - # with TCL_OK which will end the script evaluation without any - # error handling noise. We simply stop. By first returning to - # the very top of the callstack, we allow NSF to cleanup - # behind itself at the various dispatch levels + # with TCL_ERROR which will end the script evaluation. By + # first returning to the very top of the callstack, we allow + # NSF to cleanup behind itself at the various dispatch levels # (ObjectDispatch, MethodDispatch(), ...). # # Using [exit -1] directly leaves us with a partially unwinded @@ -133,10 +132,10 @@ # effectively skips the cleanup blocks throughout the NSF method # dispatch chain. # + + # exit -1 + return -code error; # return -level [expr {[info level]-1}] -code error - #return -level [expr {[info level]-1}] -code ok; # exit -1 - return -code error - } if {[info exists :post]} {:call "post" ${:post}} }