com.atlassian.jira.util
Class ValidationFailureException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.atlassian.jira.util.ValidationFailureException
All Implemented Interfaces:
Serializable

public class ValidationFailureException
extends RuntimeException

A validation exception is essentially a "throwable" error collection.

Since:
v4.3
See Also:
ErrorCollection, Serialized Form

Constructor Summary
ValidationFailureException(ErrorCollection errors)
          Constructs a new ValidationFailureException initialised with a collection of errors.
ValidationFailureException(String message)
          Constructs a new ValidationFailureException with a single error message.
ValidationFailureException(String message, ErrorCollection errors, Throwable throwable)
          Constructs a new ValidationFailureException with an error message, a collection of errors, and a cause.
ValidationFailureException(String message, Throwable throwable)
          Constructs a new ValidationFailureException with a single error message and a cause.
 
Method Summary
 ErrorCollection errors()
          Returns the validation errors.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValidationFailureException

public ValidationFailureException(String message)
Constructs a new ValidationFailureException with a single error message.

Parameters:
message - a String containing an error message

ValidationFailureException

public ValidationFailureException(String message,
                                  Throwable throwable)
Constructs a new ValidationFailureException with a single error message and a cause.

Parameters:
message - a String containing an error message
throwable - the Throwable that caused the validation failure

ValidationFailureException

public ValidationFailureException(ErrorCollection errors)
Constructs a new ValidationFailureException initialised with a collection of errors.

Parameters:
errors - an ErrorCollection containing collection of validation errors

ValidationFailureException

public ValidationFailureException(String message,
                                  ErrorCollection errors,
                                  Throwable throwable)
Constructs a new ValidationFailureException with an error message, a collection of errors, and a cause.

Parameters:
message - a String containing an error message
errors - an ErrorCollection containing collection of validation errors
throwable - the Throwable that caused the validation failure
Method Detail

errors

public ErrorCollection errors()
Returns the validation errors.

Returns:
an ErrorCollection


Copyright © 2002-2014 Atlassian. All Rights Reserved.