Overview
| Artifact ID: | c6bdf25a392d72ea251fd7bcb6331f3ac2baccbe |
|---|---|
| Ticket: | 2935779fffffffffffffffffffffffffffffffff
Incorrect -errorline from compiled [catch] |
| User & Date: | msofer on 2014-08-06 17:06:40 |
Changes
- assignee changed to: "dgp"
- closer changed to: "nobody"
- comment changed to:
The documentation states: "catch script ?resultVarName? ?optionsVarName?" ... "The value of the -errorline entry is an integer indicating which line of script was being evaluated when the error occurred." However, if one runs some [catch] code inside a proc, the -errorline integer indicates the line of the proc script that has the error and not the line of the catch script, as is stated in the doc. The following code shows the problem: proc test {} { puts inside...\[test] puts "some more text" switch {} { default { catch { puts "inside script" sdfsdf # the error } err opt } } puts $err puts $opt } % test inside...[test] some more text inside script invalid command name "sdfsdf" -code 1 -level 0 -errorcode NONE -errorinfo {invalid command name "sdfsdf" while executing "sdfsdf # the error"} -errorline 8 instead of -errorline 3 - icomment: "Nothing much to say on this."
- login: "msofer"
- mimetype: "text/plain"
- severity changed to: "Minor"