#7 BSF: Give line numbers of errors when possible

open
nobody
None
5
2005-08-29
2005-08-29
No

I'm working on a project that uses BeanShell scripting
via Jakarta BSF. Unfortunately, I found the error
messages BeanShell provided to be of little use in
debugging, since they always said "line: 0 column:
columnNo". Hence, I modified the eval function in the
BSF engine to read the error line number from the
exception whenever possible.

This is patch does not completely solve the problem, as
ParseException errors are often created in such a way
that trying to read the error line number gives a
NullPointerException, even though the line number (and
sometimes column) are often known at the time the
exception is thrown. Ideally, a future patch should
modify ParseException to give the proper error line
whenever possible and not throw an error.

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks