Package org.javalite.validation
Class ValidationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.javalite.validation.ValidationException
-
- All Implemented Interfaces:
Serializable
public class ValidationException extends RuntimeException
- Author:
- Igor Polevoy
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ValidationException(Validatable validatable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Errorserrors()Convenience method, returns the same object with errors that is attached to a model generated this exception.Errorserrors(Locale locale)Convenience method, returns the same object with errors that is attached to a model generated this exception.StringgetMessage()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
ValidationException
public ValidationException(Validatable validatable)
-
-
Method Detail
-
getMessage
public String getMessage()
- Overrides:
getMessagein classThrowable
-
errors
public Errors errors()
Convenience method, returns the same object with errors that is attached to a model generated this exception.- Returns:
- the same object wit errors that is attached to a model generated this exception
-
errors
public Errors errors(Locale locale)
Convenience method, returns the same object with errors that is attached to a model generated this exception.- Parameters:
locale- locale in case messages are localized.- Returns:
- the same object wit errors that is attached to a model generated this exception
-
-