public class ValidatorException extends java.lang.Exception
IValidator
when submitted input is not valid.Constructor and Description |
---|
ValidatorException(java.lang.String errorMessage) |
ValidatorException(java.lang.String errorMessage,
IRender errorRenderer,
ValidationConstraint constraint)
Creates a new instance.
|
ValidatorException(java.lang.String errorMessage,
ValidationConstraint constraint) |
Modifier and Type | Method and Description |
---|---|
ValidationConstraint |
getConstraint() |
IRender |
getErrorRenderer()
Returns the error renderer for this exception, which may be null.
|
public ValidatorException(java.lang.String errorMessage)
public ValidatorException(java.lang.String errorMessage, ValidationConstraint constraint)
public ValidatorException(java.lang.String errorMessage, IRender errorRenderer, ValidationConstraint constraint)
errorMessage
- the default error message to be used (this may be overriden by the
IValidationDelegate
)errorRenderer
- to use to render the error message (may be null). This is used with custom
validators that create renderers that produce rich markup (such as icons or links
to help pages). Such renderes are expected to implement a toString()
that returns a simple error message (without any markup).constraint
- a validation constraint that has been compromised, or null if no constraint is
applicablepublic ValidationConstraint getConstraint()
public IRender getErrorRenderer()