|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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.
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 |
|---|
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.
e - The error information encapsulated in a SynchronizerException.
The encapsulation may take the form of the exception
message or a wrapped exception.
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.
void warning(SynchronizerProcessingException e)
throws SynchronizerProcessingException
Receive notification of a recoverable warning.
A warning is neither an error or fatal error.
e - The warning information encapsulated in a SynchronizerProcessingException.
The encapsulation may take the form of the exception
message or a wrapped exception.
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.
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.
e - The error information encapsulated in a SynchronizerProcessingException.
The encapsulation may take the form of the exception
message or a wrapped exception.
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||