Package io.guise.framework.validator
Class ValidationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- io.guise.framework.validator.ValidationException
-
- All Implemented Interfaces:
java.io.Serializable
public class ValidationException extends java.lang.Exception
Exception class for a validation error. The stored message may be a resource reference, which will be resolved at a later time when needed.- Author:
- Garret Wilson
- See Also:
Resources.createStringResourceReference(String)
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ValidationException()
Constructs a new exception withnull
as its detail message.ValidationException(java.lang.String message)
Constructs a new exception with the specified detail message.ValidationException(java.lang.String message, java.lang.Object value)
Constructs a new exception with the specified detail message and value object.ValidationException(java.lang.String message, java.lang.Throwable cause)
Constructs a new exception with the specified detail message and cause.ValidationException(java.lang.String message, java.lang.Throwable cause, java.lang.Object value)
Constructs a new exception with the specified detail message, cause, and value object.ValidationException(java.lang.Throwable cause)
Constructs a new exception with the specified cause and a detail message of(cause==null ? null : cause.toString())
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getValue()
-
-
-
Constructor Detail
-
ValidationException
public ValidationException()
Constructs a new exception withnull
as its detail message. The cause is not initialized, and may subsequently be initialized by a call toThrowable.initCause(java.lang.Throwable)
.
-
ValidationException
public ValidationException(java.lang.String message)
Constructs a new exception with the specified detail message. The cause is not initialized, and may subsequently be initialized by a call toThrowable.initCause(java.lang.Throwable)
.- Parameters:
message
- The detail message. The detail message is saved for later retrieval by theThrowable.getMessage()
method.
-
ValidationException
public ValidationException(java.lang.String message, java.lang.Object value)
Constructs a new exception with the specified detail message and value object. The cause is not initialized, and may subsequently be initialized by a call toThrowable.initCause(java.lang.Throwable)
.- Parameters:
message
- The detail message. The detail message is saved for later retrieval by theThrowable.getMessage()
method.value
- The value being validated, which may be of any type, ornull
if the value being validated is not available.
-
ValidationException
public ValidationException(java.lang.Throwable cause)
Constructs a new exception with the specified cause and a detail message of(cause==null ? null : cause.toString())
.- Parameters:
cause
- The cause (which is saved for later retrieval by theThrowable.getCause()
method), ornull
if the cause is nonexistent or unknown.
-
ValidationException
public ValidationException(java.lang.String message, java.lang.Throwable cause)
Constructs a new exception with the specified detail message and cause.- Parameters:
message
- The detail message (which is saved for later retrieval by theThrowable.getMessage()
method).cause
- The cause (which is saved for later retrieval by theThrowable.getCause()
method), ornull
if the cause is nonexistent or unknown.
-
ValidationException
public ValidationException(java.lang.String message, java.lang.Throwable cause, java.lang.Object value)
Constructs a new exception with the specified detail message, cause, and value object.- Parameters:
message
- The detail message (which is saved for later retrieval by theThrowable.getMessage()
method).cause
- The cause (which is saved for later retrieval by theThrowable.getCause()
method), ornull
if the cause is nonexistent or unknown.value
- The value being validated, which may be of any type, ornull
if the value being validated is not available.
-
-