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:
java.io.Serializable
- Direct Known Subclasses:
MarshalException,ResolverException,SchemaException,ValidationException
public class XMLException extends CastorException
An exception that is used to signal an error that has occured during marshaling or unmarshaling.- Version:
- $Revision: 6995 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
- Author:
- Keith Visco
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XMLException()Creates a new XMLException with no message or nested Exception.XMLException(java.lang.String message)Creates a new XMLException with the given message.XMLException(java.lang.String message, int errorCode)Creates a new XMLException with the given message and error code.XMLException(java.lang.String message, java.lang.Throwable exception)Creates a new XMLException with the given message and nested Exception.XMLException(java.lang.String message, java.lang.Throwable exception, int errorCode)Creates a new XMLException with the given message, nested Exception, and errorCode.XMLException(java.lang.Throwable exception)Creates a new XMLException with the given nested Exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetErrorCode()Returns the error code for this Exception, or -1 if no error code exists.voidsetErrorCode(int errorCode)Sets the error code for this Exception.voidsetLocation(Location location)Sets the location information for this Exception.java.lang.StringtoString()Returns the String representation of this Exception.-
Methods inherited from class org.exolab.castor.core.exceptions.CastorException
getCause, getMessage, initCause, printStackTrace, printStackTrace, printStackTrace
-
-
-
-
Constructor Detail
-
XMLException
public XMLException()
Creates a new XMLException with no message or nested Exception.
-
XMLException
public XMLException(java.lang.String message)
Creates a new XMLException with the given message.- Parameters:
message- the message for this Exception
-
XMLException
public XMLException(java.lang.Throwable exception)
Creates a new XMLException with the given nested Exception.- Parameters:
exception- the nested exception
-
XMLException
public XMLException(java.lang.String message, int errorCode)Creates a new XMLException with the given message and error code.- Parameters:
message- the message for this ExceptionerrorCode- the errorCode for this Exception
-
XMLException
public XMLException(java.lang.String message, java.lang.Throwable exception)Creates a new XMLException with the given message and nested Exception.- Parameters:
message- the detail message for this Exceptionexception- the nested exception
-
XMLException
public XMLException(java.lang.String message, java.lang.Throwable exception, int errorCode)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 Detail
-
setLocation
public void setLocation(Location location)
Sets the location information for this Exception.- Parameters:
location- The location information for this validation exception.
-
toString
public java.lang.String toString()
Returns the String representation of this Exception.- Overrides:
toStringin classjava.lang.Throwable- Returns:
- the String representation of this Exception.
-
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
-
-