Package net.sf.saxon
Class StandardErrorHandler
java.lang.Object
net.sf.saxon.StandardErrorHandler
- All Implemented Interfaces:
ErrorHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCallback interface for SAX: not for application usevoidCallback interface for SAX: not for application useintReturn the number of errors (including warnings) reportedprotected voidreportError(SAXParseException e, boolean isFatal) Common routine for SAX errors and fatal errorsvoidsetErrorOutput(Writer writer) Set output for error messages produced by the default error handler.voidCallback interface for SAX: not for application use
-
Constructor Details
-
StandardErrorHandler
-
-
Method Details
-
setErrorOutput
Set output for error messages produced by the default error handler. The default error handler does not throw an exception for parse errors or input I/O errors, rather it returns a result code and writes diagnostics to a user-specified output writer, which defaults to System.err
This call has no effect if setErrorHandler() has been called to supply a user-defined error handler- Parameters:
writer- The Writer to use for error messages
-
warning
Callback interface for SAX: not for application use- Specified by:
warningin interfaceErrorHandler
-
error
Callback interface for SAX: not for application use- Specified by:
errorin interfaceErrorHandler- Throws:
SAXException
-
fatalError
Callback interface for SAX: not for application use- Specified by:
fatalErrorin interfaceErrorHandler- Throws:
SAXException
-
reportError
Common routine for SAX errors and fatal errors -
getErrorCount
public int getErrorCount()Return the number of errors (including warnings) reported- Returns:
- the number of errors and warnings
-