Posted to tcl by kbk at Mon Jul 21 01:36:35 GMT 2008view raw

  1. namespace path ::tcl::unsupported
  2. proc a {} {
  3. tailcall b
  4. }
  5. proc b {} {
  6. tailcall c
  7. }
  8. proc c {} {
  9. error "this is an error"
  10. }
  11. catch {a} result
  12. puts $::errorInfo
  13.  
  14. ---
  15.  
  16. result is:
  17.  
  18. this is an error
  19. while executing
  20. "error "this is an error""
  21. (procedure "c" line 2)
  22. invoked from within
  23. "a"