Class NullErrorHandler

java.lang.Object
org.tquadrat.foundation.xml.parse.NullErrorHandler
All Implemented Interfaces:
ErrorHandler

@ClassVersion(sourceVersion="$Id: NullErrorHandler.java 895 2021-04-05 12:40:34Z tquadrat $") @API(status=STABLE, since="0.1.0") public final class NullErrorHandler extends Object implements ErrorHandler

This implementation for a XML Error handler swallows the error messages. The methods

have an empty body.

This error handler is useful when really no internal error handling is desired; calling DocumentBuilder.setErrorHandler(ErrorHandler) with null as argument will activate a built-in error handler with an unpredictable behaviour.

The one and only instance for this class can be obtained using the INSTANCE constant.

This simple initialisation pattern was chosen instead of a full Singleton setup because the error handler does not maintain a state.

Author:
Thomas Thrien (thomas.thrien@tquadrat.org)
Version:
$Id: NullErrorHandler.java 895 2021-04-05 12:40:34Z tquadrat $
Since:
0.1.0
See Also:
UML Diagram
UML Diagram for "org.tquadrat.foundation.xml.parse.NullErrorHandler"

UML Diagram for "org.tquadrat.foundation.xml.parse.NullErrorHandler"

UML Diagram for "org.tquadrat.foundation.xml.parse.NullErrorHandler"