Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6f625f3f7d7a718491ecc35cf899c9a84a6ad4b8
Ticket: 2142989fffffffffffffffffffffffffffffffff
add examples to the [catch] man page
User & Date: nobody on 2008-10-02 19:32:29
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    I use tcl-8.5.4.
    
    In the following code 'catch' returns 1 indicating an error but '::errorInfo' isn't set, producing 'no such variable' message.
    
    
    --- testcase ---
    proc c {} {}
    proc main {} {
      if {[catch { return [c] }]} {
        puts "ERROR: *$::errorInfo* *************"
      }
    }
    main
    
    --- output ----
    can't read "::errorInfo": no such variable
        while executing
    "puts "ERROR: *$::errorInfo* *************""
    
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "nobody"
  10. subsystem changed to: "None"
  11. title changed to: "exception is thrown but no ::errorInfo is set"
  12. type changed to: "Bug"