Skip to content
Tcl Source Code History Of Ticket 2142989
Login

History Of Ticket 2142989

Artifacts Associated With Ticket 2142989

  1. Ticket change [6f625f3f7d] (rid 100309) by nobody on 2008-10-02 19:32:29:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized 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 initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "nobody"
    10. subsystem initialized to: "None"
    11. title initialized to: "exception is thrown but no ::errorInfo is set"
    12. type initialized to: "Bug"
  2. Ticket change [30cf1a10ef] (rid 93323) by msofer on 2008-10-03 02:46:25:

    1. closedate changed to: "2008-10-02T19:46:25"
    2. closer changed to: "msofer"
    3. icomment:
      Wrong diagnostic: [catc] is not returning 1 (error) but 2 (return); no error, no errorInfo ...
       mig@oli:~$ tclsh
       % proc c {} {}
       % catch {return [c]}
       2
      
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. resolution changed to: "Invalid"
    7. status changed to: "Pending"
    8. username: "msofer"
  3. Ticket change [80e0d75f3d] (rid 116945) by yurivict on 2008-10-03 04:43:38:

    1. icomment:
      Makes sense: 'catch' has 5 possible return values (0..4).
      
      Then I suggest you add another example of basic 'catch' usage in EXAMPLES section of catch(n) demonstrating all 5 return values.
      Otherwise people look at the example (if {[catch...]} {...exit...}) and get misled by it's simplicity.
      
      
    2. login: "yurivict"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. username: "yurivict"
  4. Ticket change [98a365780c] (rid 110643) by msofer on 2008-10-03 05:07:28:

    1. assignee changed to: "msofer"
    2. icomment:
      Catch can return a lot of other codes - essentially, any 32-bit integer value:
       % catch {return -code 1234 -level 0}
       1234
      If you have a suggestion on how to improve the man page and examples, please add it here.
      
      
    3. login: "msofer"
    4. mimetype: "text/plain"
    5. priority changed to: "3 Low"
    6. resolution changed to: "None"
    7. title changed to: "add examples to the [catch] man page"
    8. username: "msofer"
  5. Ticket change [6bc1c145ec] (rid 128380) by dkf on 2009-04-05 00:09:01:

    1. closedate changed to: "2009-04-04T17:09:01"
    2. closer changed to: "dkf"
    3. icomment:
      Might also want to try the [try] command in 8.6
      
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. resolution changed to: "Works For Me"
    7. status changed to: "Pending"
    8. username: "dkf"
  6. Ticket change [577a5c00c0] (rid 94493) by sf-robot on 2009-04-19 09:21:06:

    1. closedate changed to: "2009-04-19T02:21:06"
    2. closer changed to: "sf-robot"
    3. icomment:
      
      
      allow_comments - 1
      
      This Tracker item was closed automatically by the system. It was
      previously set to a Pending status, and the original submitter
      did not respond within 14 days (the time period specified by
      the administrator of this Tracker).
      
      
    4. login: "sf-robot"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "sf-robot"