public static class Validator.InvalidValueException extends RuntimeException
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.
Constructor and Description |
---|
InvalidValueException(String message)
Constructs a new
InvalidValueException with the specified
message. |
InvalidValueException(String message,
Validator.InvalidValueException... causes)
Constructs a new
InvalidValueException with a set of causing
validation exceptions. |
Modifier and Type | Method and Description |
---|---|
Validator.InvalidValueException[] |
getCauses()
Returns the
InvalidValueExceptions that caused this
exception. |
String |
getHtmlMessage()
Returns the message of the error in HTML.
|
boolean |
isInvisible()
Check if the error message should be hidden.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public InvalidValueException(String message)
InvalidValueException
with the specified
message.message
- The detail message of the problem.public InvalidValueException(String message, Validator.InvalidValueException... causes)
InvalidValueException
with a set of causing
validation exceptions. The causing validation exceptions are included
when the exception is painted to the client.message
- The detail message of the problem.causes
- One or more InvalidValueException
s that caused
this exception.public boolean isInvisible()
public String getHtmlMessage()
public Validator.InvalidValueException[] getCauses()
InvalidValueExceptions
that caused this
exception.InvalidValueExceptions
that
caused this exception. Returns an empty array if this
exception was not caused by other exceptions.Copyright © 2019 Vaadin Ltd. All rights reserved.