Package org.exolab.castor.xml
Class ValidationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.exolab.castor.core.exceptions.CastorException
org.exolab.castor.xml.XMLException
org.exolab.castor.xml.ValidationException
- All Implemented Interfaces:
Serializable
An Exception that can be used to signal XML validation errors.
- Version:
- $Revision$ $Date: 2005-12-13 14:58:48 -0700 (Tue, 13 Dec 2005) $
- Author:
- Keith Visco
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newValidationException
with no message or nested exception.ValidationException
(String message) Creates a newValidationException
with the given message.ValidationException
(String message, int errorCode) Deprecated.ValidationException
(String message, Exception exception, int errorCode) Deprecated.ValidationException
(String message, Throwable exception) Creates a newValidationException
with the given message and nested exception.ValidationException
(Throwable exception) Creates a new ValidationException with the given nested Exception. -
Method Summary
Modifier and TypeMethodDescriptionReturns the location of the Exception.getNext()
Returns the next ValidationException in the list, or null if no additional validation exceptions exist.protected boolean
remove
(ValidationException exception) Removes the given ValidationException from the current list of ValidationException.protected void
setLast
(ValidationException exception) Adds the given ValidationException as the last exception in the list.void
setLocation
(Location location) Sets the location information for this ValidationException.void
setNext
(ValidationException exception) Sets the given ValidationException as the next Exception in the list.toString()
Returns the String representation of this ValidationException.Methods inherited from class org.exolab.castor.xml.XMLException
getErrorCode, setErrorCode
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
ValidationException
public ValidationException()Creates a newValidationException
with no message or nested exception. -
ValidationException
Creates a newValidationException
with the given message.- Parameters:
message
- the message for this exception
-
ValidationException
Deprecated.Creates a newValidationException
with the given message.- Parameters:
message
- the message for this exceptionerrorCode
- the errorCode for this exception
-
ValidationException
Creates a new ValidationException with the given nested Exception.- Parameters:
exception
- the nested Exception
-
ValidationException
Creates a newValidationException
with the given message and nested exception.- Parameters:
message
- the detail message for this exceptionexception
- the nested exception
-
ValidationException
Deprecated.Creates a newValidationException
with the given message, nested exception, and error code.- Parameters:
message
- the detail message for this exceptionexception
- the nested exceptionerrorCode
- the error code for this exception
-
-
Method Details
-
getLocation
Returns the location of the Exception.- Returns:
- the location of the Exception.
-
getNext
Returns the next ValidationException in the list, or null if no additional validation exceptions exist.- Returns:
- the next ValidationException in the list, or null if there are no additional Exceptions.
-
setLocation
Sets the location information for this ValidationException.- Overrides:
setLocation
in classXMLException
- Parameters:
location
- The location information for this validation Exception.
-
remove
Removes the given ValidationException from the current list of ValidationException.- Parameters:
exception
- the ValidationException to remove- Returns:
- true if the given ValidationException was successfully removed.
-
setLast
Adds the given ValidationException as the last exception in the list. This is equivalent to callingsetNext(org.exolab.castor.xml.ValidationException)
if no additional ValidationException(s) exist.- Parameters:
exception
- the ValidationException to set as the last exception in the list.
-
setNext
Sets the given ValidationException as the next Exception in the list. This method will overwrite any existing ValidationException that may already exist as the next Exception.- Parameters:
exception
- the ValidationException to set as the next Exception in the list.
-
toString
Returns the String representation of this ValidationException.- Overrides:
toString
in classXMLException
- Returns:
- the String representation of this ValidationException.
-