com.xml_project.morganaxquery
Class XPathException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.xml_project.morganaxquery.XPathException
All Implemented Interfaces:
java.io.Serializable

public class XPathException
extends java.lang.Exception

An XPathException is raised, if an error occurred during compilation or execution of an XPath or XQuery expression.

See Also:
Serialized Form

Nested Class Summary
static class XPathException.ExceptionCode
           Error conditions as in http://www.w3.org/TR/xquery/#id-errors
 
Constructor Summary
XPathException(XPathException.ExceptionCode code, java.lang.String message)
           Create a new XPathException.
XPathException(XPathException.ExceptionCode code, java.lang.String message, int line, int column)
           Create a new XPathException.
XPathException(XPathException.ExceptionCode code, java.lang.String message, com.xml_project.morganaxquery.lexer.LexedSymbol.Position pos)
           Create a new XPathException.
XPathException(XS_QName errorName, java.lang.String message, XdmSequence errorItem)
           Create a new XPathException.
 
Method Summary
 javax.xml.namespace.QName getErrorName()
           Returns the error condition as a QName object.
 XPathException.ExceptionCode getExceptionCode()
           Returns the error condition as an ExceptionCode object
 java.lang.String getMessage()
           
 java.lang.String getRawMessage()
           Returns only the message associated with this expection without error condition and/or position.
 boolean is(XPathException.ExceptionCode code)
           Test whether the error condition is of a special type
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XPathException

public XPathException(XS_QName errorName,
                      java.lang.String message,
                      XdmSequence errorItem)

Create a new XPathException.

Parameters:
errorName -
message -
errorItem -

XPathException

public XPathException(XPathException.ExceptionCode code,
                      java.lang.String message)

Create a new XPathException.

Parameters:
code -
message -

XPathException

public XPathException(XPathException.ExceptionCode code,
                      java.lang.String message,
                      com.xml_project.morganaxquery.lexer.LexedSymbol.Position pos)

Create a new XPathException.

Parameters:
code -
message -
pos -

XPathException

public XPathException(XPathException.ExceptionCode code,
                      java.lang.String message,
                      int line,
                      int column)

Create a new XPathException.

Parameters:
code -
message -
line -
column -
Method Detail

getExceptionCode

public XPathException.ExceptionCode getExceptionCode()

Returns the error condition as an ExceptionCode object

Returns:
the error condition

is

public boolean is(XPathException.ExceptionCode code)

Test whether the error condition is of a special type

Parameters:
code - the error condition to test for.
Returns:
true, if both are equal.

getErrorName

public javax.xml.namespace.QName getErrorName()

Returns the error condition as a QName object.

Returns:
the error condition as QName

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable

getRawMessage

public java.lang.String getRawMessage()

Returns only the message associated with this expection without error condition and/or position.

Returns:
the error message.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Throwable