Jacl should display line number on error
Brought to you by:
mdejong
When running TCL/Jacl-based scripts, it is often
difficult to determine where a particular problem is
without the help of line numbers in the error message.
Here is an example script (named blah.tcl):
puts "hi"
set blah [[]
puts "bye"
Here is the output of running this script:
C:\dev\jacl\bin>jaclsh blah.tcl
hi
missing close-bracket
In this example it is easy to tell that the problem is
on line 2, but in larger script files, this can be more
difficult to determine.
The output should read something like:
missing close-bracket on line 2:
set blah [[]
Thanks!
Logged In: NO
I've noticed you can get around this by outputting "$errorInfo". One problem with error info (that might be easier to fix), is that it doesn't take into account backslash newline, line continuation. That is, if I've got 8 backslash newline line continuations in my file with 300 lines, and I have an error on the last line, it will report the error line number as 292, not 300. Maybe this should be a separate bug, but it is closely related to the newline issue.
-Jared