Overview
| Artifact ID: | cd3df63324840402c652ddafdd590d3f3a5cd806 |
|---|---|
| Ticket: | 2935779fffffffffffffffffffffffffffffffff
Incorrect -errorline from compiled [catch] |
| User & Date: | dzach on 2010-01-20 18:57:49 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- 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 - foundin changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "dzach"
- subsystem changed to: "16. Commands A-H"
- title changed to: "Inaccuracy in docs for [catch] option -errorline "
- type changed to: "Bug"