Package com.vaadin.featurepack.data
Class Validator.InvalidValueException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.vaadin.featurepack.data.Validator.InvalidValueException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
FDateField.UnparsableDateString,FieldGroup.FieldGroupInvalidValueException,Validator.EmptyValueException
- Enclosing interface:
Validator
Exception that is thrown by a
Validator when a value is invalid.
The default implementation of InvalidValueException does not support HTML
in error messages. To enable HTML support, override
getHtmlMessage() and use the subclass in validators.
- Since:
- 3.0
- Author:
- Vaadin Ltd.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInvalidValueException(String message) Constructs a newInvalidValueExceptionwith the specified message.InvalidValueException(String message, Validator.InvalidValueException... causes) Constructs a newInvalidValueExceptionwith a set of causing validation exceptions. -
Method Summary
Modifier and TypeMethodDescriptionReturns theInvalidValueExceptionsthat caused this exception.Returns the message of the error in HTML.booleanCheck if the error message should be hidden.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidValueException
Constructs a newInvalidValueExceptionwith the specified message.- Parameters:
message- The detail message of the problem.
-
InvalidValueException
Constructs a newInvalidValueExceptionwith a set of causing validation exceptions. The causing validation exceptions are included when the exception is painted to the client.- Parameters:
message- The detail message of the problem.causes- One or moreInvalidValueExceptions that caused this exception.
-
-
Method Details
-
isInvisible
public boolean isInvisible()Check if the error message should be hidden. An empty (null or "") message is invisible unless it contains nested exceptions that are visible.- Returns:
- true if the error message should be hidden, false otherwise
-
getHtmlMessage
Returns the message of the error in HTML. Note that this API may change in future versions. -
getCauses
Returns theInvalidValueExceptionsthat caused this exception.- Returns:
- An array containing the
InvalidValueExceptionsthat caused this exception. Returns an empty array if this exception was not caused by other exceptions.
-