net.sf.saxon

Class StandardErrorHandler

public class StandardErrorHandler extends Object implements ErrorHandler

Constructor Summary
StandardErrorHandler(ErrorListener listener)
Method Summary
voiderror(SAXParseException e)
Callback interface for SAX: not for application use
voidfatalError(SAXParseException e)
Callback interface for SAX: not for application use
intgetErrorCount()
Return the number of errors reported
intgetFatalErrorCount()
Return the number of fatal errors reported
intgetWarningCount()
Return the number of warnings (including warnings) reported
protected voidreportError(SAXParseException e, boolean isFatal)
Common routine for SAX errors and fatal errors
voidsetErrorOutput(Writer writer)
Set output for error messages produced by the default error handler.
voidwarning(SAXParseException e)
Callback interface for SAX: not for application use

Constructor Detail

StandardErrorHandler

public StandardErrorHandler(ErrorListener listener)

Method Detail

error

public void error(SAXParseException e)
Callback interface for SAX: not for application use

fatalError

public void fatalError(SAXParseException e)
Callback interface for SAX: not for application use

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

getWarningCount

public int getWarningCount()
Return the number of warnings (including warnings) reported

Returns: the number of warnings

reportError

protected void reportError(SAXParseException e, boolean isFatal)
Common routine for SAX errors and fatal errors

setErrorOutput

public void setErrorOutput(Writer writer)
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

public void warning(SAXParseException e)
Callback interface for SAX: not for application use