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 new ValidationException with no message or nested Exception.ValidationException(String message) Creates a new ValidationException with the given message.ValidationException(String message, int errorCode) Creates a new ValidationException with the given message.ValidationException(String message, Exception exception, int errorCode) Creates a new ValidationException with the given message, nested Exception, and errorCode.ValidationException(String message, Throwable exception) Creates a new ValidationException 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 booleanremove(ValidationException exception) Removes the given ValidationException from the current list of ValidationException.protected voidsetLast(ValidationException exception) Adds the given ValidationException as the last exception in the list.voidsetLocation(Location location) Sets the location information for this ValidationException.voidsetNext(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, setErrorCodeMethods inherited from class org.exolab.castor.core.exceptions.CastorException
getCause, getMessage, initCause, printStackTrace, printStackTrace, printStackTraceMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, setStackTrace
-
Constructor Details
-
ValidationException
public ValidationException()Creates a new ValidationException with no message or nested Exception. -
ValidationException
Creates a new ValidationException with the given message.- Parameters:
message- the message for this Exception
-
ValidationException
Creates a new ValidationException 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 new ValidationException with the given message and nested Exception.- Parameters:
message- the detail message for this Exceptionexception- the nested Exception
-
ValidationException
Creates a new ValidationException 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
-
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:
setLocationin 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:
toStringin classXMLException- Returns:
- the String representation of this ValidationException.
-