Posted to tcl by kbk at Fri Oct 29 14:48:42 GMT 2010view raw

  1. proc failtrace {n1 n2 op} {
  2. return -code error "trace on $n1 fails by request"
  3. }
  4. trace add variable result1 write failtrace
  5.  
  6. proc x {} {
  7. variable result1
  8. for {set i 0} {$i < 100} {incr i} {
  9. set status2 [catch {
  10. set status1 [catch {
  11. return -code error -level 0 "original failure"
  12. } result1 options1]
  13. } result2 options2]
  14. lappend retval $status2 $result2 $options2
  15. }
  16. }
  17.  
  18. puts [x]