net.larsan.urd.util
Class ErrorHandler

java.lang.Object
  |
  +--net.larsan.urd.util.ErrorHandler
Direct Known Subclasses:
DefaultErrorHandler

public abstract class ErrorHandler
extends java.lang.Object

A generalized error handler interface for the Norna package. This error handler contains an overridden handleException method which takes an optional 'source' argument which specifies the source object of the exeption when working on collections.

Subclasses should extend the handleImpl method to actually implement the message handling.

Version:
Alpha-0.1 / 2002-10-06 21:37
Author:
Lars J. Nilsson

Constructor Summary
ErrorHandler()
           
 
Method Summary
 void handleException(java.lang.Object source, java.lang.Throwable exception)
          Handle exception with a source argument.
abstract  void handleException(java.lang.String msg, java.lang.Object source, java.lang.Throwable exception)
          Handle exception with a source and a message.
 void handleException(java.lang.String msg, java.lang.Throwable exception)
          Handle exception with a source argument.
 void handleException(java.lang.Throwable exception)
          Handle exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorHandler

public ErrorHandler()
Method Detail

handleException

public void handleException(java.lang.Throwable exception)
Handle exception.

Parameters:
exception - Error to handle

handleException

public void handleException(java.lang.Object source,
                            java.lang.Throwable exception)
Handle exception with a source argument. This source object should correspond to the object which the event was thrown from.

Parameters:
source - Event originator
exception - Error to handle

handleException

public void handleException(java.lang.String msg,
                            java.lang.Throwable exception)
Handle exception with a source argument. This source object should correspond to the object which the event was thrown from.

Parameters:
msg - Error to msg
exception - Error to handle

handleException

public abstract void handleException(java.lang.String msg,
                                     java.lang.Object source,
                                     java.lang.Throwable exception)
Handle exception with a source and a message. Any of the given arguments may be null and should be gracefully handles.

Parameters:
msg - Error to msg, may be null
source - Roor source object, may be null
exception - Error to handle, may be null