home *** CD-ROM | disk | FTP | other *** search
/ Practical Programming in Tcl & Tk (4th Edition) / TCLBOOK4.BIN / pc / exsource / 6_18.tcl < prev    next >
Text File  |  2003-04-16  |  216b  |  14 lines

  1. #
  2. # Example 6-18
  3. # Preserving errorInfo when calling error.
  4. #
  5.  
  6. if {[catch {foo} result]} {
  7.     global errorInfo
  8.     set savedInfo $errorInfo
  9.     # Attempt to handle the error here, but cannot...
  10.     error $result $savedInfo
  11. }
  12.  
  13.  
  14.