org.exolab.castor.core.exceptions
Class CastorException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.exolab.castor.core.exceptions.CastorException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PersistenceException, TransactionManagerAcquireException, XMLException

public class CastorException
extends java.lang.Exception

The base exception for Castor (or at least Castor XML)

Version:
$Revision: 1.4 $ $Date: 2005/04/08 16:43:32 $
Author:
Keith Visco
See Also:
Serialized Form

Constructor Summary
CastorException()
          Creates a new CastorException with no message, or nested Exception
CastorException(java.lang.String message)
          Creates a new CastorException with the given message.
CastorException(java.lang.String message, java.lang.Throwable cause)
          Creates a new CastorException with the given message and cause.
CastorException(java.lang.Throwable cause)
          Creates a new CastorException with the given cause.
 
Method Summary
 java.lang.Throwable getCause()
          Match the JDK 1.4 Throwable version of getCause() on JDK<1.4 systems.
 java.lang.Throwable getException()
          Deprecated. Please move to getCause().
 java.lang.String getMessage()
          Return the detailed message from this exception.
 java.lang.Throwable initCause(java.lang.Throwable cause)
          Match the JDK 1.4 Throwable version of initCause() on JDK<1.4 systems.
 void printStackTrace()
          Print a stack trace to stderr.
 void printStackTrace(java.io.PrintStream s)
          Print a stack trace to the specified PrintStream.
 void printStackTrace(java.io.PrintWriter w)
          Print a stack trace to the specified PrintWriter.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CastorException

public CastorException()
Creates a new CastorException with no message, or nested Exception


CastorException

public CastorException(java.lang.String message)
Creates a new CastorException with the given message.

Parameters:
message - the message for this Exception

CastorException

public CastorException(java.lang.String message,
                       java.lang.Throwable cause)
Creates a new CastorException with the given message and cause.

Parameters:
message - The message for this exception.
cause - A Throwable instance.

CastorException

public CastorException(java.lang.Throwable cause)
Creates a new CastorException with the given cause.

Parameters:
cause - A Throwable instance.
Method Detail

initCause

public java.lang.Throwable initCause(java.lang.Throwable cause)
Match the JDK 1.4 Throwable version of initCause() on JDK<1.4 systems.

Overrides:
initCause in class java.lang.Throwable
Parameters:
cause - The throwable you wish to attach to this exception as the 'cause' of the exception.
Returns:
This exception. (Throwable also returns this, not the cause.)

getCause

public java.lang.Throwable getCause()
Match the JDK 1.4 Throwable version of getCause() on JDK<1.4 systems.

Overrides:
getCause in class java.lang.Throwable
Returns:
The throwable cause of this exception.

getException

public java.lang.Throwable getException()
Deprecated. Please move to getCause().

Match some internal API and some surrounding API to provide this method.

Returns:
the exception, which in turn caused this Exception to be thrown, or null if nested exception exists.

getMessage

public java.lang.String getMessage()
Return the detailed message from this exception. Chain message information from child exceptions into it, so that the message shows the chain of message information available.

Overrides:
getMessage in class java.lang.Throwable

printStackTrace

public void printStackTrace()
Print a stack trace to stderr.

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream s)
Print a stack trace to the specified PrintStream.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - The PrintStream to print a stack trace to.

printStackTrace

public void printStackTrace(java.io.PrintWriter w)
Print a stack trace to the specified PrintWriter.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
w - The PrintWriter to print a stack trace to.


Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com