com.xml_project.morganaxproc.xquery
Class XPathException

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

public class XPathException
extends 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, String message)
           Create a new XPathException.
XPathException(XPathException.ExceptionCode code, String message, int line, int column)
           Create a new XPathException.
XPathException(XPathException.ExceptionCode code, String message, com.xml_project.morganaxproc.xquery.lexer.LexedSymbol.Position pos)
           Create a new XPathException.
XPathException(XS_QName errorName, String message, XdmSequence errorItem)
           Create a new XPathException.
 
Method Summary
 QName getErrorName()
           Returns the error condition as a QName object.
 XPathException.ExceptionCode getExceptionCode()
           Returns the error condition as an ExceptionCode object
 String getMessage()
           
 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
 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,
                      String message,
                      XdmSequence errorItem)

Create a new XPathException.

Parameters:
errorName -
message -
errorItem -

XPathException

public XPathException(XPathException.ExceptionCode code,
                      String message)

Create a new XPathException.

Parameters:
code -
message -

XPathException

public XPathException(XPathException.ExceptionCode code,
                      String message,
                      com.xml_project.morganaxproc.xquery.lexer.LexedSymbol.Position pos)

Create a new XPathException.

Parameters:
code -
message -
pos -

XPathException

public XPathException(XPathException.ExceptionCode code,
                      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 QName getErrorName()

Returns the error condition as a QName object.

Returns:
the error condition as QName

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable

getRawMessage

public String getRawMessage()

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

Returns:
the error message.

toString

public String toString()
Overrides:
toString in class Throwable