org.springframework.richclient.exceptionhandling.delegation
Class ChainInspectingExceptionHandlerDelegate

java.lang.Object
  extended by org.springframework.richclient.exceptionhandling.delegation.AbstractExceptionHandlerDelegate
      extended by org.springframework.richclient.exceptionhandling.delegation.ChainInspectingExceptionHandlerDelegate
All Implemented Interfaces:
Thread.UncaughtExceptionHandler, ExceptionHandlerDelegate

public class ChainInspectingExceptionHandlerDelegate
extends AbstractExceptionHandlerDelegate

Checks the exception chain to determine if it wants to handle it. In most cases this class is overkill and SimpleExceptionHandlerDelegate with a purger will suffice. Think about it: just purging out MySpecificLoginException suffices most of the time, it doesn't really matter that it's wrapped in MyWrapperException.

Since:
0.3.0
Author:
Geoffrey De Smet
See Also:
SimpleExceptionHandlerDelegate, DefaultExceptionPurger

Nested Class Summary
static class ChainInspectingExceptionHandlerDelegate.ChainPart
           
 
Field Summary
 
Fields inherited from class org.springframework.richclient.exceptionhandling.delegation.AbstractExceptionHandlerDelegate
exceptionHandler, exceptionPurger, purgeOnAppropriateCheck, purgeOnHandling
 
Constructor Summary
ChainInspectingExceptionHandlerDelegate()
           
ChainInspectingExceptionHandlerDelegate(List<ChainInspectingExceptionHandlerDelegate.ChainPart> chainPartList, Thread.UncaughtExceptionHandler exceptionHandler)
           
 
Method Summary
 Throwable findChainPartThrowable(ChainInspectingExceptionHandlerDelegate.ChainPart chainPart, Throwable firstThrowable)
           
 boolean hasAppropriateHandlerPurged(Throwable root)
           
 void setChainPartList(List<ChainInspectingExceptionHandlerDelegate.ChainPart> chainPartList)
           
 void uncaughtExceptionPurged(Thread thread, Throwable throwable)
           
 
Methods inherited from class org.springframework.richclient.exceptionhandling.delegation.AbstractExceptionHandlerDelegate
hasAppropriateHandler, setExceptionHandler, setExceptionPurger, setPurgeOnAppropriateCheck, setPurgeOnHandling, uncaughtException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChainInspectingExceptionHandlerDelegate

public ChainInspectingExceptionHandlerDelegate()

ChainInspectingExceptionHandlerDelegate

public ChainInspectingExceptionHandlerDelegate(List<ChainInspectingExceptionHandlerDelegate.ChainPart> chainPartList,
                                               Thread.UncaughtExceptionHandler exceptionHandler)
Method Detail

setChainPartList

public void setChainPartList(List<ChainInspectingExceptionHandlerDelegate.ChainPart> chainPartList)

hasAppropriateHandlerPurged

public boolean hasAppropriateHandlerPurged(Throwable root)
Specified by:
hasAppropriateHandlerPurged in class AbstractExceptionHandlerDelegate

findChainPartThrowable

public Throwable findChainPartThrowable(ChainInspectingExceptionHandlerDelegate.ChainPart chainPart,
                                        Throwable firstThrowable)

uncaughtExceptionPurged

public void uncaughtExceptionPurged(Thread thread,
                                    Throwable throwable)
Overrides:
uncaughtExceptionPurged in class AbstractExceptionHandlerDelegate


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.