org.purl.xnode
Class XNodeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.purl.xnode.XNodeException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
XNodeStoreProviderException

public class XNodeException
extends Exception

Signals that an exception has occurred during XNode processing. This includes an option to capture the processor state when the XNodeException occurred, as defined in XNodeState.

The XNode API (the package org.purl.xnode.*, both its source code and documentation), are released under the Apache 2.0 License. For more details, check the LICENSE file contained with the distribution, or see The Ceryle Project for more information. It is distributed with no warranty.

Since:
JDK1.3
Version:
$Id: XNodeException.java,v 3.4 2007-06-15 12:10:37 altheim Exp $
Author:
Murray Altheim
See Also:
XNodeState, Exception, Serialized Form

Constructor Summary
XNodeException(Exception exception)
          Constructor for XNodeException tunnelling an original Exception.
XNodeException(String message)
          Constructor for XNodeException provided with an error String message.
XNodeException(String message, Exception exception)
          Constructor for XNodeException including a message and tunnelling an original Exception.
XNodeException(XNodeState state, Exception exception)
          Constructor for XNodeException tunnelling an original Exception, including an XNodeState state indicator.
XNodeException(XNodeState state, String message)
          Constructor for XNodeException provided with an int errorcode and an error String message.
XNodeException(XNodeState state, String message, Exception exception)
          Constructor for XNodeException tunnelling an original Exception, including a state indicator, and a message String.
 
Method Summary
 Exception getException()
          Returns the tunnelled Exception, if any.
 String getMessage()
          Returns the message for this XNodeException.
 XNodeState getState()
          Returns the processor state at the time of the Exception.
 String toString()
          Overrides toString() to return a String representation of this XNodeException, substituting any tunnelled Exception if available.
 
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

XNodeException

public XNodeException(String message)
Constructor for XNodeException provided with an error String message.

Parameters:
message - the exception message.

XNodeException

public XNodeException(XNodeState state,
                      String message)
Constructor for XNodeException provided with an int errorcode and an error String message.

See Processing State codes.

Parameters:
state - the processing state when the Exception occurred.
message - the exception message.
See Also:
for processing state codes.

XNodeException

public XNodeException(Exception exception)
Constructor for XNodeException tunnelling an original Exception.

Parameters:
exception - the original Exception.

XNodeException

public XNodeException(XNodeState state,
                      Exception exception)
Constructor for XNodeException tunnelling an original Exception, including an XNodeState state indicator.

See Processing State codes.

Parameters:
state - the processing state when the Exception occurred.
exception - the original Exception.
See Also:
for processing state codes.

XNodeException

public XNodeException(String message,
                      Exception exception)
Constructor for XNodeException including a message and tunnelling an original Exception.

Parameters:
message - the Exception message String.
exception - the original Exception.

XNodeException

public XNodeException(XNodeState state,
                      String message,
                      Exception exception)
Constructor for XNodeException tunnelling an original Exception, including a state indicator, and a message String.

See Processing State codes.

Parameters:
state - the processing state when the Exception occurred.
message - the Exception message String.
exception - the original Exception.
See Also:
for processing state codes.
Method Detail

getException

public Exception getException()
Returns the tunnelled Exception, if any.

Returns:
the tunnelled Exception, null if there is none.

getState

public XNodeState getState()
Returns the processor state at the time of the Exception. If this has not been set, returns XNodeStore.UNDEFINED.

Returns:
an XNodeState state indicator.
See Also:
XNodeState

getMessage

public String getMessage()
Returns the message for this XNodeException.

If the tunnelled Exception and this XNodeException has no message of its own, returns the message of the tunnelled Exception.

Overrides:
getMessage in class Throwable
Returns:
the warning or error message.

toString

public String toString()
Overrides toString() to return a String representation of this XNodeException, substituting any tunnelled Exception if available.

Overrides:
toString in class Throwable
Returns:
a String representation of this XNodeException.


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.