Package org.openscience.cdk.io
Class DefaultChemObjectReaderErrorHandler
java.lang.Object
org.openscience.cdk.io.DefaultChemObjectReaderErrorHandler
- All Implemented Interfaces:
IChemObjectReaderErrorHandler
public class DefaultChemObjectReaderErrorHandler
extends Object
implements IChemObjectReaderErrorHandler
Default implementation of the
IChemObjectReaderErrorHandler interface.
Emits log entries using the LoggingToolFactory.- Author:
- Uli Fechner
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new instance using theDefaultChemObjectReaderErrorHandlerclass as the source for logging purposes.DefaultChemObjectReaderErrorHandler(Class<?> clazz) Constructs a new instance using a given class as the source for logging purposes.Constructs a new instance using the provided logging tool. -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleError(String message) Method that should react on an error message send by anIChemObjectReader.voidhandleError(String message, int row, int colStart, int colEnd) Method that should react on an error message send by anIChemObjectReader.voidhandleError(String message, int row, int colStart, int colEnd, Exception exception) Method that should react on an error message send by anIChemObjectReader.voidhandleError(String message, Exception exception) Method that should react on an error message send by anIChemObjectReader.voidhandleFatalError(String message) Method that should react on a fatal error message send by anIChemObjectReader.voidhandleFatalError(String message, int row, int colStart, int colEnd) Method that should react on a fatal error message send by anIChemObjectReader.voidhandleFatalError(String message, int row, int colStart, int colEnd, Exception exception) Method that should react on a fatal error message send by anIChemObjectReader.voidhandleFatalError(String message, Exception exception) Method that should react on a fatal error message send by anIChemObjectReader.
-
Constructor Details
-
DefaultChemObjectReaderErrorHandler
public DefaultChemObjectReaderErrorHandler()Constructs a new instance using theDefaultChemObjectReaderErrorHandlerclass as the source for logging purposes. -
DefaultChemObjectReaderErrorHandler
Constructs a new instance using a given class as the source for logging purposes.- Parameters:
clazz- the class for which theILoggingToolshould be constructed
-
DefaultChemObjectReaderErrorHandler
Constructs a new instance using the provided logging tool.- Parameters:
logger- the logger to be used for emitting log entries
-
-
Method Details
-
handleError
Description copied from interface:IChemObjectReaderErrorHandlerMethod that should react on an error message send by anIChemObjectReader.- Specified by:
handleErrorin interfaceIChemObjectReaderErrorHandler- Parameters:
message- Error found while reading.
-
handleError
Description copied from interface:IChemObjectReaderErrorHandlerMethod that should react on an error message send by anIChemObjectReader.- Specified by:
handleErrorin interfaceIChemObjectReaderErrorHandler- Parameters:
message- Error found while reading.exception- Exception thrown while reading.
-
handleError
Description copied from interface:IChemObjectReaderErrorHandlerMethod that should react on an error message send by anIChemObjectReader.- Specified by:
handleErrorin interfaceIChemObjectReaderErrorHandler- Parameters:
message- Error found while reading.row- Row in the file where the error is found.colStart- Start column in the file where the error is found.colEnd- End column in the file where the error is found.
-
handleError
Description copied from interface:IChemObjectReaderErrorHandlerMethod that should react on an error message send by anIChemObjectReader.- Specified by:
handleErrorin interfaceIChemObjectReaderErrorHandler- Parameters:
message- Error found while reading.colStart- Start column in the file where the error is found.colEnd- End column in the file where the error is found.exception- Exception thrown while reading.
-
handleFatalError
Description copied from interface:IChemObjectReaderErrorHandlerMethod that should react on a fatal error message send by anIChemObjectReader. This error is fatal, and the state of reading is no longer defined.- Specified by:
handleFatalErrorin interfaceIChemObjectReaderErrorHandler- Parameters:
message- Error found while reading.
-
handleFatalError
Description copied from interface:IChemObjectReaderErrorHandlerMethod that should react on a fatal error message send by anIChemObjectReader. This error is fatal, and the state of reading is no longer defined.- Specified by:
handleFatalErrorin interfaceIChemObjectReaderErrorHandler- Parameters:
message- Error found while reading.exception- Exception thrown while reading.
-
handleFatalError
Description copied from interface:IChemObjectReaderErrorHandlerMethod that should react on a fatal error message send by anIChemObjectReader. This error is fatal, and the state of reading is no longer defined.- Specified by:
handleFatalErrorin interfaceIChemObjectReaderErrorHandler- Parameters:
message- Error found while reading.row- Row in the file where the fatal error is found.colStart- Start column in the file where the fatal error is found.colEnd- End column in the file where the fatal error is found.
-
handleFatalError
public void handleFatalError(String message, int row, int colStart, int colEnd, Exception exception) Description copied from interface:IChemObjectReaderErrorHandlerMethod that should react on a fatal error message send by anIChemObjectReader. This error is fatal, and the state of reading is no longer defined.- Specified by:
handleFatalErrorin interfaceIChemObjectReaderErrorHandler- Parameters:
message- Error found while reading.colStart- Start column in the file where the fatal error is found.colEnd- End column in the file where the fatal error is found.exception- Exception thrown while reading.
-