Package org.openscience.cdk.io.cml
Class CMLErrorHandler
- java.lang.Object
-
- org.openscience.cdk.io.cml.CMLErrorHandler
-
- All Implemented Interfaces:
ErrorHandler
public class CMLErrorHandler extends Object implements ErrorHandler
CDK's SAX2 ErrorHandler for giving feedback on XML errors in the CML document. Output is redirected to org.openscience.cdk.tools.LoggingTool.- Author:
- Egon Willighagen <egonw@sci.kun.nl>
- Source code:
- main
- Belongs to CDK module:
- io
-
-
Field Summary
Fields Modifier and Type Field Description boolean
abortOnErrors
boolean
reportErrors
-
Constructor Summary
Constructors Constructor Description CMLErrorHandler()
Constructor a SAX2 ErrorHandler that uses the cdk.tools.LoggingTool class to output errors and warnings to.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
error(SAXParseException exception)
Outputs a SAXParseException error to the logger.void
fatalError(SAXParseException exception)
Outputs as fatal SAXParseException error to the logger.void
warning(SAXParseException exception)
Outputs a SAXParseException warning to the logger.
-
-
-
Field Detail
-
reportErrors
public final boolean reportErrors
- See Also:
- Constant Field Values
-
abortOnErrors
public final boolean abortOnErrors
- See Also:
- Constant Field Values
-
-
Method Detail
-
error
public void error(SAXParseException exception) throws SAXException
Outputs a SAXParseException error to the logger.- Specified by:
error
in interfaceErrorHandler
- Parameters:
exception
- Exception to output- Throws:
SAXException
-
fatalError
public void fatalError(SAXParseException exception) throws SAXException
Outputs as fatal SAXParseException error to the logger.- Specified by:
fatalError
in interfaceErrorHandler
- Parameters:
exception
- Exception to output- Throws:
SAXException
-
warning
public void warning(SAXParseException exception) throws SAXException
Outputs a SAXParseException warning to the logger.- Specified by:
warning
in interfaceErrorHandler
- Parameters:
exception
- Exception to output- Throws:
SAXException
-
-