Package net.sf.saxon.lib
Class StandardErrorHandler
java.lang.Object
net.sf.saxon.lib.StandardErrorHandler
- All Implemented Interfaces:
ErrorHandler
- Direct Known Subclasses:
ParseHtml.HTML5ErrorHandler
A default implementation of the SAX ErrorHandler interface. Used by Saxon to catch XML parsing errors
if no error handler is supplied by the application.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Callback interface for SAX: not for application usevoid
Callback interface for SAX: not for application useint
Return the number of errors reportedint
Return the number of fatal errors reportedint
Return the number of warnings (including warnings) reportedprotected void
reportError
(SAXParseException e, boolean isFatal) Common routine for SAX errors and fatal errorsvoid
setSilent
(boolean silent) Indicate whether the error handler should report errors to the ErrorListenervoid
Callback interface for SAX: not for application use
-
Constructor Details
-
StandardErrorHandler
-
-
Method Details
-
setSilent
public void setSilent(boolean silent) Indicate whether the error handler should report errors to the ErrorListener- Parameters:
silent
- if true, errors should not be reported. Used during doc-available() processing
-
warning
Callback interface for SAX: not for application use- Specified by:
warning
in interfaceErrorHandler
-
error
Callback interface for SAX: not for application use- Specified by:
error
in interfaceErrorHandler
- Throws:
SAXException
-
fatalError
Callback interface for SAX: not for application use- Specified by:
fatalError
in interfaceErrorHandler
- Throws:
SAXException
-
reportError
Common routine for SAX errors and fatal errors- Parameters:
e
- the exception being handledisFatal
- true if the error is classified as fatal
-
getWarningCount
public int getWarningCount()Return the number of warnings (including warnings) reported- Returns:
- the number of warnings
-
getErrorCount
public int getErrorCount()Return the number of errors reported- Returns:
- the number of non-fatal errors
-
getFatalErrorCount
public int getFatalErrorCount()Return the number of fatal errors reported- Returns:
- the number of fatal errors
-
getErrorReporter
-