TUM CCSM Commons

edu.tum.cs.commons.error
Class CollectingExceptionHandler<X extends java.lang.Exception>

java.lang.Object
  extended by edu.tum.cs.commons.error.CollectingExceptionHandler<X>
All Implemented Interfaces:
IExceptionHandler<X,NeverThrownRuntimeException>

public class CollectingExceptionHandler<X extends java.lang.Exception>
extends java.lang.Object
implements IExceptionHandler<X,NeverThrownRuntimeException>

An exception handler that collects exceptions for later use.

Version:
$Rev: 26283 $
Author:
hummelb, $Author: juergens $
Rating:
GREEN Hash: 7696FFE0F017E8EE1D6F8B382A43B3B3

Constructor Summary
CollectingExceptionHandler()
           
 
Method Summary
 void clearExceptions()
          Clears the list of exceptions.
 UnmodifiableList<X> getExceptions()
          Returns the list of exception caught so far.
 void handleException(X exception)
          Handle the provided exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectingExceptionHandler

public CollectingExceptionHandler()
Method Detail

handleException

public void handleException(X exception)
                     throws NeverThrownRuntimeException
Handle the provided exception.

Specified by:
handleException in interface IExceptionHandler<X extends java.lang.Exception,NeverThrownRuntimeException>
Parameters:
exception - the exception being handled.
Throws:
NeverThrownRuntimeException

getExceptions

public UnmodifiableList<X> getExceptions()
Returns the list of exception caught so far.


clearExceptions

public void clearExceptions()
Clears the list of exceptions.


TUM CCSM Commons

TUM CCSM Commons - 2.7