Artifacts Associated With Ticket 2142989fffffffffffffffffffffffffffffffff
Ticket change [6f625f3f7d] (rid 100309) by nobody on 2008-10-02 19:32:29:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- 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* *************"" - foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "None"
- title initialized to: "exception is thrown but no ::errorInfo is set"
- type initialized to: "Bug"
Ticket change [30cf1a10ef] (rid 93323) by msofer on 2008-10-03 02:46:25:
- closedate changed to: "2008-10-02T19:46:25"
- closer changed to: "msofer"
- 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 - login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Pending"
- username: "msofer"
Ticket change [80e0d75f3d] (rid 116945) by yurivict on 2008-10-03 04:43:38:
- 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. - login: "yurivict"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "yurivict"
- icomment:
Ticket change [98a365780c] (rid 110643) by msofer on 2008-10-03 05:07:28:
- assignee changed to: "msofer"
- 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. - login: "msofer"
- mimetype: "text/plain"
- priority changed to: "3 Low"
- resolution changed to: "None"
- title changed to: "add examples to the [catch] man page"
- username: "msofer"
Ticket change [6bc1c145ec] (rid 128380) by dkf on 2009-04-05 00:09:01:
- closedate changed to: "2009-04-04T17:09:01"
- closer changed to: "dkf"
- icomment:
Might also want to try the [try] command in 8.6
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Works For Me"
- status changed to: "Pending"
- username: "dkf"
Ticket change [577a5c00c0] (rid 94493) by sf-robot on 2009-04-19 09:21:06:
- closedate changed to: "2009-04-19T02:21:06"
- closer changed to: "sf-robot"
- 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).
- login: "sf-robot"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "sf-robot"