org.apache.commons.latka
Class ValidationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.apache.commons.latka.ValidationException
All Implemented Interfaces:
java.io.Serializable

public class ValidationException
extends java.lang.Exception

This exception is thrown by validators when a validation has failed

Version:
$Revision: 155424 $
Author:
Doug Sale, dIon Gillard (mainly javadoc)
See Also:
Serialized Form

Constructor Summary
ValidationException()
          Create a validation exception with a null label and reason
ValidationException(java.lang.String label, java.lang.String reason)
          Create a validation exception with the given label and reason
 
Method Summary
 java.lang.String getLabel()
          User's description of the test/assertion
 java.lang.String getMessage()
          the message of the exception
 java.lang.String getReason()
          Why the test/assertion failed
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, 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

ValidationException

public ValidationException()
Create a validation exception with a null label and reason


ValidationException

public ValidationException(java.lang.String label,
                           java.lang.String reason)
Create a validation exception with the given label and reason

Parameters:
label - the user's description of the assertion/test
reason - the reason it failed
Method Detail

getMessage

public java.lang.String getMessage()
the message of the exception

Overrides:
getMessage in class java.lang.Throwable
Returns:
the message of the exception, built from the label and reason

getLabel

public java.lang.String getLabel()
User's description of the test/assertion

Returns:
User's description of the test/assertion

getReason

public java.lang.String getReason()
Why the test/assertion failed

Returns:
Why the test/assertion failed


Copyright © 2002-2009 The Apache Software Foundation. All Rights Reserved.