public abstract class ErrorHandler extends Object
If a Validator application needs to implementation of customized error handling, it must implement this class.
Use this handler when call theSimpleValidator.validate(Object,
org.forgerock.json.JsonPointer, ErrorHandler)}
method. The helpers will then report all errors.| Constructor and Description |
|---|
ErrorHandler() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
assembleException()
Deprecated.
|
abstract void |
error(ValidationException exception)
Receive notification of an error.
|
boolean |
hasError()
Get the final result of the validation.
|
public abstract void error(ValidationException exception) throws SchemaException
For example, a validator would use this callback to report the violation of a validity constraint. The default behaviour is to take no action.
The validator must continue to provide normal validation after invoking this method: it should still be possible for the application to process the document through to the end. If the application cannot do so, then the parser should report a fatal error.
Filters may use this method to report other, non-JSON errors as well.
exception - The error information encapsulated in a
validation exception.SchemaException - Any JSON exception, possibly
wrapping another exception.public boolean hasError()
false. If the validator has called the {#handleError} method
then it return true.@Deprecated public abstract void assembleException() throws ValidationException
ValidationException - when this instance wraps an error message(s).Copyright © 2025 Open Identity Platform Community. All rights reserved.