Class InvalidInputException

All Implemented Interfaces:
Serializable

public class InvalidInputException extends WorkflowException
Exception to indicate the user input is invalid. Handles both general errors and errors specific to an input.
Version:
$Revision: 1.2 $
Author:
Patrick Lightbody
See Also:
  • Constructor Details

    • InvalidInputException

      public InvalidInputException()
    • InvalidInputException

      public InvalidInputException(Object o)
      Creates a new exception using the supplied Object as a generic base. If the object is an instance of this exception, all properties are copied to this exception. If the object is an instance of Map or String[], an errorName->errorMessage mapping will be attempted to be extracted. If the object is something else, it's toString() method will be called and added as a single generic error.
      Parameters:
      o - the object
    • InvalidInputException

      public InvalidInputException(String error)
      Creates a new exception with an associated generic error.
      Parameters:
      error - a generic error message
    • InvalidInputException

      public InvalidInputException(String name, String error)
      Creates a new exception with an error specific to an input.
      Parameters:
      name - the input name that contains the error
      error - an error about the given name
  • Method Details

    • getErrors

      public Map getErrors()
      Returns a map (String->String) of the input-specific errors.
      Returns:
      a map (String->String) of the input-specific errors
    • getGenericErrors

      public List getGenericErrors()
      Returns a list (String) of generic errors.
      Returns:
      A list (String) of generic errors
    • addError

      public void addError(String error)
      Adds a generic error.
      Parameters:
      error - the generic error message
    • addError

      public void addError(String name, String error)
      Adds an input-specific error.
      Parameters:
      name - the name of the input
      error - the error message
    • toString

      public String toString()
      Overrides:
      toString in class Throwable