On 2007-03-23 04:44:06 +0100, "Ernest Friedman-Hill" <[EMAIL PROTECTED]> said:
On Mar 22, 2007, at 12:55 PM, Helge Hartmann wrote:
Hello!
When I parse my JessML code and something goes wrong, I would like to
have some informationa about where the error occurs (a line number).
I get the information: Message: Variable used before definition: spadeLength.
Is there a way to get the line number?
Call "getCause()" on the JessException, and check if it's a
SAXParseException. If it is, then cast it and call the
SAXParseException.getLineNumber() and getColumnNumber() methods.
I try to get the type of the excetion with this code snippet:
...
} catch (JessException e) {
Throwable th = e.getCause();
if(th instanceof SAXParseException) {
But every time a JessException is thrown, the getCause method returns null.
--------------------------------------------------------
Ernest Friedman-Hill
Advanced Software Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
PO Box 969, MS 9012 [EMAIL PROTECTED]
Livermore, CA 94550 http://www.jessrules.com
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------