com.deltaxml.sync.jaxp
Interface ErrorListener

All Known Implementing Classes:
DefaultErrorHandler, RethrowingErrorHandler

public interface ErrorListener

This interface is provided so that users can customize the error handling of the DeltaXML.com tools. For example users may wish to report errors in a GUI dialog box, or ignore non-fatal errors.

The interface should be implemented and then the implementation passed as an argument to the Synchronizer.setErrorListener(ErrorListener) method.

If a Synchronizer does not register an ErrorListener the default action is to report all warnings/errors/fatal-errors to System.err

All errors are reported in terms of the SynchronizerProcessingException class. In some cases the underlying cause may be a different class of exception and it may be appropriate to use the getCause() method.

One such example are SAXParseExceptions which will be wrapped as SynchronizerProcessingExceptions.

If a fatalError(SynchronizerProcessingException) is encountered there is no guarantee of a correct, or indeed any, result being produced.

Version:
$Revision: 3173 $
Author:
Nigel Whitaker
See Also:
Synchronizer.setErrorListener(ErrorListener)

Method Summary
 void error(SynchronizerProcessingException e)
          Receive notification of a recoverable error.
 void fatalError(SynchronizerProcessingException e)
          Receive notification of a fatal error.
 void warning(SynchronizerProcessingException e)
          Receive notification of a recoverable warning.
 

Method Detail

error

void error(SynchronizerProcessingException e)
           throws SynchronizerProcessingException

Receive notification of a recoverable error.

A recoverable error is one where processing may continue and results files may be partially produced.

Parameters:
e - The error information encapsulated in a SynchronizerException. The encapsulation may take the form of the exception message or a wrapped exception.
Throws:
SynchronizerProcessingException - The Listener may choose to re-throw the original exception if it does not wish to deal with it and thus terminate the synchronization.

warning

void warning(SynchronizerProcessingException e)
             throws SynchronizerProcessingException

Receive notification of a recoverable warning.

A warning is neither an error or fatal error.

Parameters:
e - The warning information encapsulated in a SynchronizerProcessingException. The encapsulation may take the form of the exception message or a wrapped exception.
Throws:
SynchronizerProcessingException - The Listener may choose to re-throw the original exception if it does not wish to deal with it and thus terminate the synchronization.

fatalError

void fatalError(SynchronizerProcessingException e)
                throws SynchronizerProcessingException

Receive notification of a fatal error.

A fatal error is one where processing may continue and further errors may be reported. However result files may be incorrect or incomplete.

Parameters:
e - The error information encapsulated in a SynchronizerProcessingException. The encapsulation may take the form of the exception message or a wrapped exception.
Throws:
SynchronizerProcessingException - The Listener may choose to re-throw the original exception if it does not wish to deal with it and thus terminate the synchronization.


© 2006-2007 DeltaXML Ltd. All Rights Reserved.