Class ValidationException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ValidationException
    extends XMLException
    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:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ValidationException()
      Creates a new ValidationException with no message or nested Exception.
      ValidationException​(java.lang.String message)
      Creates a new ValidationException with the given message.
      ValidationException​(java.lang.String message, int errorCode)
      Creates a new ValidationException with the given message.
      ValidationException​(java.lang.String message, java.lang.Exception exception, int errorCode)
      Creates a new ValidationException with the given message, nested Exception, and errorCode.
      ValidationException​(java.lang.String message, java.lang.Throwable exception)
      Creates a new ValidationException with the given message and nested Exception.
      ValidationException​(java.lang.Throwable exception)
      Creates a new ValidationException with the given nested Exception.
    • Constructor Detail

      • ValidationException

        public ValidationException()
        Creates a new ValidationException with no message or nested Exception.
      • ValidationException

        public ValidationException​(java.lang.String message)
        Creates a new ValidationException with the given message.
        Parameters:
        message - the message for this Exception
      • ValidationException

        public ValidationException​(java.lang.String message,
                                   int errorCode)
        Creates a new ValidationException with the given message.
        Parameters:
        message - the message for this Exception
        errorCode - the errorCode for this Exception
      • ValidationException

        public ValidationException​(java.lang.Throwable exception)
        Creates a new ValidationException with the given nested Exception.
        Parameters:
        exception - the nested Exception
      • ValidationException

        public ValidationException​(java.lang.String message,
                                   java.lang.Throwable exception)
        Creates a new ValidationException with the given message and nested Exception.
        Parameters:
        message - the detail message for this Exception
        exception - the nested Exception
      • ValidationException

        public ValidationException​(java.lang.String message,
                                   java.lang.Exception exception,
                                   int errorCode)
        Creates a new ValidationException with the given message, nested Exception, and errorCode.
        Parameters:
        message - the detail message for this Exception
        exception - the nested Exception
        errorCode - the errorCode for this Exception
    • Method Detail

      • getLocation

        public Location getLocation()
        Returns the location of the Exception.
        Returns:
        the location of the Exception.
      • getNext

        public ValidationException 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

        public void setLocation​(Location location)
        Sets the location information for this ValidationException.
        Overrides:
        setLocation in class XMLException
        Parameters:
        location - The location information for this validation Exception.
      • remove

        protected boolean remove​(ValidationException exception)
        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

        protected void setLast​(ValidationException exception)
        Adds the given ValidationException as the last exception in the list. This is equivalent to calling setNext(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

        public void setNext​(ValidationException exception)
        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

        public java.lang.String toString()
        Returns the String representation of this ValidationException.
        Overrides:
        toString in class XMLException
        Returns:
        the String representation of this ValidationException.