com.icl.saxon.trax
Class ProcessorException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.xml.sax.SAXException
                    |
                    +--com.icl.saxon.trax.ProcessorException
All Implemented Interfaces:
java.io.Serializable

public class ProcessorException
extends org.xml.sax.SAXException

This exception serves as a root exception of TRaX exception, and is thrown in raw form when an exceptional condition occurs in the Processor object.

Open issues:

Abstract exception root?

Should the root TRaX exception be abstract?

Derive from SAXException?

Keith Visco writes: I don't think these exceptions should extend SAXException, but could nest a SAXException if necessary.
MHK: In the Saxon version of this class, I have changed it to derive from SAXException rather than SAXParseException, because in most situations no Locator is available.

See Also:
Serialized Form

Constructor Summary
ProcessorException(java.lang.Exception err)
          Create a new ProcessorException to wrap a given exception.
ProcessorException(java.lang.String message)
          Create a new ProcessorException from a message.
ProcessorException(java.lang.String message, java.lang.Exception e)
          Wrap an existing exception in a ProcessorException.
 
Methods inherited from class org.xml.sax.SAXException
getException, getMessage, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProcessorException

public ProcessorException(java.lang.String message,
                          java.lang.Exception e)
Wrap an existing exception in a ProcessorException.

This is used for throwing processor exceptions before the processing has started.

Parameters:
message - The error or warning message, or null to use the message from the embedded exception.
e - Any exception
See Also:
Locator, Parser.setLocale(java.util.Locale)

ProcessorException

public ProcessorException(java.lang.String message)
Create a new ProcessorException from a message.

This constructor is especially useful when an application detects an error directly.

Parameters:
message - The error or warning message.
See Also:
Locator, Parser.setLocale(java.util.Locale)

ProcessorException

public ProcessorException(java.lang.Exception err)
Create a new ProcessorException to wrap a given exception.

This constructor is especially useful when an application receives an exception from an underlying interface, e.g. an IO exception

Parameters:
exception - The exception to be wrapped.
See Also:
Locator, Parser.setLocale(java.util.Locale)