Class FailFastErrorHandler
- java.lang.Object
-
- org.forgerock.json.schema.validator.ErrorHandler
-
- org.forgerock.json.schema.validator.FailFastErrorHandler
-
public class FailFastErrorHandler extends ErrorHandler
FailFastErrorHandler implements theErrorHandlerin a way it re-throws the exception at first time.The exception prevents the validator to continue the validation of an already invalid object.
-
-
Constructor Summary
Constructors Constructor Description FailFastErrorHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidassembleException()Deprecated.voiderror(ValidationException exception)Receive notification of an error.-
Methods inherited from class org.forgerock.json.schema.validator.ErrorHandler
hasError
-
-
-
-
Method Detail
-
error
public void error(ValidationException exception) throws SchemaException
Receive notification of an error.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.
- Specified by:
errorin classErrorHandler- Parameters:
exception- The error information encapsulated in a validation exception.- Throws:
SchemaException- Any JSON exception, possibly wrapping another exception.
-
assembleException
@Deprecated public void assembleException() throws ValidationException
Deprecated.Wrap in aValidationExceptionif not already of that type.- Specified by:
assembleExceptionin classErrorHandler- Throws:
ValidationException- when there is any error wrapped inside the handler.
-
-