com.xmlmind.fo.converter
Interface ErrorHandler

All Known Implementing Classes:
Driver

public interface ErrorHandler

Basic interface for conversion error handling.

If an application needs to implement customized error handling, it must implement this interface and then register an instance with the conversion driver using the setErrorHandler method. The driver will then report all errors and warnings through this interface.


Method Summary
 void error(Exception exception)
          Receive notification of an error.
 void warning(Exception exception)
          Receive notification of a warning.
 

Method Detail

error

void error(Exception exception)
           throws Exception
Receive notification of an error.

The conversion driver will use this method to report conditions that are considered fatal errors. The default behaviour is to throw an exception. An application may handle these conditions in a different way, however the conversion process is aborted once this method has been invoked.

Parameters:
exception - the error information, encapsulated in an exception
Throws:
Exception - if an error occurs

warning

void warning(Exception exception)
             throws Exception
Receive notification of a warning.

The conversion driver will use this method to report conditions that are not considered fatal errors. The default behaviour is to print a warning message to the standard error output stream.

Parameters:
exception - the warning information, encapsulated in an exception
Throws:
Exception - if an error occurs