source testing.tcl test try-1.1 "Simple case" { try { set x 0 } finally { incr x } } 0 test try-1.2 "Error in body" { list [catch { try { set x 0 error message } finally { incr x } } msg] $msg $x } {1 message 1} test try-1.3 "Error in finally" { list [catch { try { set x 0 } finally { incr x error finally } } msg] $msg $x } {1 finally 1} test try-1.4 "Error in both" { list [catch { try { set x 0 error message } finally { incr x error finally } } msg] $msg $x } {1 message 1} test try-1.5 "break in body" { list [catch { try { set x 0 break } finally { incr x } } msg] $msg $x } {3 {} 1} test try-1.6 "break in finally" { list [catch { try { set x 0 } finally { incr x break } } msg] $msg $x } {3 {} 1}