| Ticket UUID: | 3562482 | ||
| Title: | info frame gives wrong line number in catch | ||
| Type: | Bug | Created on: | 2012-08-28 16:10:06 |
| Submitter: | duquette | Assigned to: | nobody |
| Subsystem: | None | Severity: | |
| Priority: | 5 Medium | Last modified: | 2012-08-31 01:19:50 |
| Status: | Open | Closed by: | |
| Resolution: | None | Closed on: | |
| Version: | None | ||
| Description: | ||||
This occurs in Tcl 8.5.10 on Windows 7, Tcl 8.5.10. The following script (also attached)
====================================================
set script {
puts "line 2: [info frame 0]"
set a 5 ;# End line comment
;# End line comment with unneeded semi-colon
puts "line 5: [info frame 0]"
}
catch $script
=====================================================
gives the following output:
=====================================================
$ tclsh bug2.tcl
line 2: type eval line 2 cmd {info frame 0} level 0
line 5: type eval line 4 cmd {info frame 0} level 0
=====================================================
The line number reported by the second [info frame] call is off by one line number.
The culprit appears to be the line just previous, which begins with " ;#". The semi-colon is unnecessary, and if it is removed, the line number is reported correctly.
Subsequent occurrences of the same pattern will cause the offset to increment.
| ||||
| User Comments: | ||||
duquette added on 2012-08-28 23:10:10:
File Added - 452122: bug2.tcl dgp added on 2012-08-31 01:19:50:
Worth checking how this is (or isn't) related to 2935779 | ||||
