## net.sf.saxon.trans
Class XPathException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              javax.xml.transform.TransformerException
                  net.sf.saxon.trans.XPathException

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  DynamicError, SkipInstructionException, StaticError, ValidationException

public abstract class XPathException
extends javax.xml.transform.TransformerException

XPathException is used to indicate an error in an XPath expression. We don't distinguish compile-time errors from run-time errors because there are too many overlaps, e.g. constant expressions can be evaluated at compile-time, and expressions can be optimised either at compile-time or at run-time.

See Also:
  Serialized Form

Nested Class Summary
`static class` `XPathException.Circularity` Subclass used to report circularities

Constructor Summary
`XPathException(java.lang.String message)`
`XPathException(java.lang.String message, javax.xml.transform.SourceLocator loc)`
`XPathException(java.lang.String message, javax.xml.transform.SourceLocator loc, java.lang.Throwable err)`
`XPathException(java.lang.String message, java.lang.Throwable err)`
`XPathException(java.lang.Throwable err)`

Method Summary
`java.lang.String` `getErrorCodeLocalPart()`
`java.lang.String` `getErrorCodeNamespace()`
`Value` `getErrorObject()`
`boolean` `hasBeenReported()`
`boolean` `isTypeError()`
`StaticError` `makeStatic()` Force an exception to a static error
`void` `setErrorCode(java.lang.String code)`
`void` `setErrorCode(java.lang.String namespace, java.lang.String code)`
`void` `setErrorObject(Value value)`
`void` `setHasBeenReported()`
`void` `setIsTypeError(boolean is)`

Methods inherited from class javax.xml.transform.TransformerException
`getCause, getException, getLocationAsString, getLocator, getMessageAndLocation, initCause, printStackTrace, printStackTrace, printStackTrace, setLocator`

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, setStackTrace, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### XPathException

    public XPathException(java.lang.String message)

### XPathException

    public XPathException(java.lang.Throwable err)

### XPathException

    public XPathException(java.lang.String message,
                          java.lang.Throwable err)

### XPathException

    public XPathException(java.lang.String message,
                          javax.xml.transform.SourceLocator loc)

### XPathException

    public XPathException(java.lang.String message,
                          javax.xml.transform.SourceLocator loc,
                          java.lang.Throwable err)

Method Detail

### makeStatic

    public StaticError makeStatic()

  Force an exception to a static error

### setIsTypeError

    public void setIsTypeError(boolean is)

### isTypeError

    public boolean isTypeError()

### setErrorCode

    public void setErrorCode(java.lang.String code)

### setErrorCode

    public void setErrorCode(java.lang.String namespace,
                             java.lang.String code)

### getErrorCodeLocalPart

    public java.lang.String getErrorCodeLocalPart()

### getErrorCodeNamespace

    public java.lang.String getErrorCodeNamespace()

### setErrorObject

    public void setErrorObject(Value value)

### getErrorObject

    public Value getErrorObject()

### setHasBeenReported

    public void setHasBeenReported()

### hasBeenReported

    public boolean hasBeenReported()