Package org.exolab.castor.xml
Class CastorException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.exolab.castor.xml.CastorException
- All Implemented Interfaces:
Serializable
The base exception for Castor (or at least Castor XML)
- Version:
- $Revision: 5951 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
- Author:
- Keith Visco
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new CastorException with no message, or nested ExceptionCastorException
(int errorCode) Creates a new CastorException with the given nested exception.CastorException
(String message) Creates a new CastorException with the given message.CastorException
(String message, int errorCode) Creates a new CastorException with the given message nested exception. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the error code for this Exception, or -1 if no error code exists.Returns the detail message for this Exceptionvoid
setErrorCode
(int errorCode) Sets the error code for this Exceptionvoid
setMessage
(String message) Sets the message for this ExceptionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CastorException
public CastorException()Creates a new CastorException with no message, or nested Exception -
CastorException
Creates a new CastorException with the given message.- Parameters:
message
- the message for this Exception
-
CastorException
public CastorException(int errorCode) Creates a new CastorException with the given nested exception.- Parameters:
errorCode
- the error code for this Exception
-
CastorException
Creates a new CastorException with the given message nested exception.- Parameters:
message
- the detail message for this exceptionerrorCode
- the error code for this Exception
-
-
Method Details
-
getErrorCode
public int getErrorCode()Returns the error code for this Exception, or -1 if no error code exists.- Returns:
- the error code for this Exception, or -1 if no error code exists
-
getMessage
Returns the detail message for this Exception- Overrides:
getMessage
in classThrowable
- Returns:
- the detail message for this Exception
-
setErrorCode
public void setErrorCode(int errorCode) Sets the error code for this Exception- Parameters:
errorCode
- the error code
-
setMessage
Sets the message for this Exception- Parameters:
message
- the message for this Exception
-