Package org.exolab.castor.xml
Class XMLException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.exolab.castor.core.exceptions.CastorException
org.exolab.castor.xml.XMLException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MarshalException
,ResolverException
,SchemaException
,ValidationException
An exception that is used to signal an error that has occurred during marshaling or unmarshaling.
- Version:
- $Revision$ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
- Author:
- Keith Visco
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of this class with no message or nested exception.XMLException
(String message) Creates a newXMLException
instance with the given message.XMLException
(String message, int errorCode) Deprecated.XMLException
(String message, Throwable exception) Creates a new XMLException with the given message and nested Exception.XMLException
(String message, Throwable exception, int errorCode) Deprecated.XMLException
(Throwable exception) Creates a new XMLException with the given nested Exception. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the error code for this Exception, or -1 if no error code exists.void
setErrorCode
(int errorCode) Sets the error code for this Exception.void
setLocation
(Location location) Sets the location information for this Exception.toString()
Returns the String representation of this Exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
XMLException
public XMLException()Creates a new instance of this class with no message or nested exception. -
XMLException
Creates a newXMLException
instance with the given message.- Parameters:
message
- the message for this Exception
-
XMLException
Creates a new XMLException with the given nested Exception.- Parameters:
exception
- the nested exception
-
XMLException
Deprecated.Creates a new XMLException with the given message and error code.- Parameters:
message
- the message for this ExceptionerrorCode
- the errorCode for this Exception
-
XMLException
-
XMLException
Deprecated.Creates a new XMLException with the given message, nested Exception, and errorCode.- Parameters:
message
- the detail message for this exceptionexception
- the nested exceptionerrorCode
- the errorCode for this Exception
-
-
Method Details
-
setLocation
Sets the location information for this Exception.- Parameters:
location
- The location information for this validation exception.
-
toString
-
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
-
setErrorCode
public void setErrorCode(int errorCode) Sets the error code for this Exception.- Parameters:
errorCode
- the error code
-