Protege 3.4.3

edu.stanford.smi.protege.util
Interface ErrorHandler<E extends Throwable>

Type Parameters:
E - - the throwable class that is used as an argument and thrown exception by all methods of this interface (e.g. ErrorHandler<ConversionException>)
All Known Implementing Classes:
DefaultErrorHandler

public interface ErrorHandler<E extends Throwable>

Basic interface for Protege error handlers.

NOTE: Protege does not use this interface for basic error handling, but we plan to do add this feature in the near future. However, there are certain components in Protege that already make use of this interface.

If an application needs to implement customized error handling, then it can implement this interface and register an instance of it with the component that already supports this type of error handling by calling the setErrorHandler method. The component will then report all errors and warnings through this interface.

The components that use this type of error handling should use this interface instead of throwing an exception. It is up to the application to decide whether to throw an exception for different types of errors and warnings or not.

Author:
Tania Tudorache

Method Summary
 void error(E e)
          Receive notification of a recoverable error.
 void fatalError(E e)
          Receive notification of an unrecoverable error.
 void warning(E e)
          Receive notification of a warning.
 

Method Detail

warning

void warning(E e)
             throws E extends Throwable
Receive notification of a warning.

Components will use this method to report conditions that are not errors or fatal errors The default behavior is to take no action. The component should continue to provide normal operation events after invoking this method: it should still be possible for the application to continue normal operation.

Parameters:
e - - The warning information encapsulated in an exception of type E.
Throws:
E - - The same type of exception as the method argument
E extends Throwable

error

void error(E e)
           throws E extends Throwable
Receive notification of a recoverable error.

Components will use this method to report conditions that are not fatal errors. The default behavior is to take no action. The component should continue to provide normal operation events after invoking this method: it should still be possible for the application to continue normal operation. If the component cannot continue normal operation is should throw a fatal error.

Parameters:
e - - The error information encapsulated in an exception of type E.
Throws:
E - - The same type of exception as the method argument
E extends Throwable

fatalError

void fatalError(E e)
                throws E extends Throwable
Receive notification of an unrecoverable error.

Components will use this method to report conditions that are fatal errors. The default behavior is to rethrow the exception. The application should not assume that the component will continue normal operation after a fatal error. The application should continue (if at all) only for the sake of collecting addition error messages.

Parameters:
e - - The error information encapsulated in an exception of type E.
Throws:
E - - The same type of exception as the method argument
E extends Throwable

Protege 3.4.3

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2009 Stanford University.