Class ValidationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
ddf.catalog.validation.ValidationException
All Implemented Interfaces:
Serializable

public abstract class ValidationException extends Exception
Thrown to indicate that a validation operation could not be completed. Provides information in the form of a summary message, a list of error messages, and a list of warnings.
Author:
Michael Menousek, Shaun Morris, Ashraf Barakat
See Also:
  • Constructor Details

    • ValidationException

      public ValidationException()
      Constructs a ValidationException with no detailed message.
    • ValidationException

      public ValidationException(String summaryMessage)
      Constructs a ValidationException with a specified summary message of the failure.
      Parameters:
      summaryMessage - summarizes why the validation operation failed
    • ValidationException

      public ValidationException(Throwable cause)
      Constructs a ValidationException with a cause of the failure.
      Parameters:
      cause - the cause of why the validation operation failed
    • ValidationException

      public ValidationException(String summaryMessage, Throwable cause)
      Constructs a ValidationException with a specified summary message and cause of the failure.
      Parameters:
      summaryMessage - summarizes why the validation operation failed
      cause - the cause of why the validation operation failed
  • Method Details

    • getErrors

      public abstract List<String> getErrors()
      Returns:
      a list of all error messages that have caused validation to fail. The error message should be human-readable plain text.
    • getWarnings

      public abstract List<String> getWarnings()
      Returns:
      a list of warning messages. Warning messages are issues that arose during validation but did not cause validation to fail. A warning message should be human-readable plain text.
    • toString

      public String toString()
      Converts this exception into a String representation.
      Overrides:
      toString in class Throwable
      Returns:
      a human-readable form of this exception