Protege 3.5

edu.stanford.smi.protege.util
Class DefaultErrorHandler<X extends Throwable>

java.lang.Object
  extended by edu.stanford.smi.protege.util.DefaultErrorHandler<X>
Type Parameters:
X -
All Implemented Interfaces:
ErrorHandler<X>

public class DefaultErrorHandler<X extends Throwable>
extends Object
implements ErrorHandler<X>

Default implementation of the ErrorHandler interface.

The default behaviour is:

  • warning - do nothing, just log the warning
  • error - do nothing, just log the error
  • fatal error - rethrow the exception
  • Author:
    Tania Tudorache
    See Also:
    ErrorHandler

    Constructor Summary
    DefaultErrorHandler()
               
     
    Method Summary
     void clear()
               
     void error(X e)
              Receive notification of a recoverable error.
     void fatalError(X e)
              Receive notification of an unrecoverable error.
     boolean hasError()
               
     void warning(X e)
              Receive notification of a warning.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    DefaultErrorHandler

    public DefaultErrorHandler()
    Method Detail

    warning

    public void warning(X e)
                 throws X extends Throwable
    Description copied from interface: ErrorHandler
    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.

    Specified by:
    warning in interface ErrorHandler<X extends Throwable>
    Parameters:
    e - - The warning information encapsulated in an exception of type E.
    Throws:
    X extends Throwable

    error

    public void error(X e)
               throws X extends Throwable
    Description copied from interface: ErrorHandler
    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.

    Specified by:
    error in interface ErrorHandler<X extends Throwable>
    Parameters:
    e - - The error information encapsulated in an exception of type E.
    Throws:
    X extends Throwable

    fatalError

    public void fatalError(X e)
                    throws X extends Throwable
    Description copied from interface: ErrorHandler
    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.

    Specified by:
    fatalError in interface ErrorHandler<X extends Throwable>
    Parameters:
    e - - The error information encapsulated in an exception of type E.
    Throws:
    X extends Throwable

    clear

    public void clear()

    hasError

    public boolean hasError()

    Protege 3.5

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