Index: library/lib/test.tcl =================================================================== diff -u -r53d0f6c3bde8bd07fb8dd0f091f9442d26539868 -r7045595af282428ca760d1d5f9351d561a43bb51 --- library/lib/test.tcl (.../test.tcl) (revision 53d0f6c3bde8bd07fb8dd0f091f9442d26539868) +++ library/lib/test.tcl (.../test.tcl) (revision 7045595af282428ca760d1d5f9351d561a43bb51) @@ -44,14 +44,18 @@ # # Current limitations: just for nx::Objects, no method/mixin cleanup/var cleanup # - set :case $name - if {[info exists arg]} { - foreach o [Object info instances -closure] {set pre_exist($o) 1} - namespace eval :: [list [current] eval $arg] - foreach o [Object info instances -closure] { - if {[info exists pre_exist($o)]} continue - if {[::nsf::object::exists $o]} {$o destroy} - } + set :case $name + if {[catch { + if {[info exists arg]} { + foreach o [Object info instances -closure] {set pre_exist($o) 1} + namespace eval :: [list [current] eval $arg] + foreach o [Object info instances -closure] { + if {[info exists pre_exist($o)]} continue + if {[::nsf::object::exists $o]} {$o destroy} + } + } + } errorMsg]} { + return -code error -errorInfo $errorMsg } } @@ -129,7 +133,10 @@ # effectively skips the cleanup blocks throughout the NSF method # dispatch chain. # - return -level [expr {[info level]-1}] -code ok; # exit -1 + + #return -level [expr {[info level]-1}] -code ok; # exit -1 + return -code error + } if {[info exists :post]} {:call "post" ${:post}} } @@ -150,3 +157,5 @@ nsf::__db_run_assertions } + +