NullPointerException in ParserException.getErrorLineNumber

Brian Hawkins <brianhks-BYHubErIwDGZvNlLnfxc/[email protected]> Wed, 22 Dec 2004 14:08:51 -0700
Newsgroups gmane.comp.java.beanshell.devel
Message-ID <[email protected]>
I have embedded bean shell in an application I've written and I want to 
get the line number when a parser error occurs so I can customize the 
error message.

Unfortunately I get the following
Exception in thread "main" java.lang.NullPointerException
        at bsh.ParseException.getErrorLineNumber(Unknown Source)

This happens in both 1.3 and 2.0 beta.  To get this I removed a 
semicolon from my script file to test error handling.

Thanks
Brian


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/