Posted to tcl by kbk at Fri Oct 29 14:48:42 GMT 2010view pretty
proc failtrace {n1 n2 op} { return -code error "trace on $n1 fails by request" } trace add variable result1 write failtrace proc x {} { variable result1 for {set i 0} {$i < 100} {incr i} { set status2 [catch { set status1 [catch { return -code error -level 0 "original failure" } result1 options1] } result2 options2] lappend retval $status2 $result2 $options2 } } puts [x]