org.apache.tapestry5.ioc.util
Class ExceptionUtils

java.lang.Object
  extended by org.apache.tapestry5.ioc.util.ExceptionUtils

public class ExceptionUtils
extends java.lang.Object

Contains static methods useful for manipulating exceptions.


Constructor Summary
ExceptionUtils()
           
 
Method Summary
static
<T extends java.lang.Throwable>
T
findCause(java.lang.Throwable t, java.lang.Class<T> type)
          Locates a particular type of exception, working its way via the cause property of each exception in the exception stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionUtils

public ExceptionUtils()
Method Detail

findCause

public static <T extends java.lang.Throwable> T findCause(java.lang.Throwable t,
                                                          java.lang.Class<T> type)
Locates a particular type of exception, working its way via the cause property of each exception in the exception stack.

Parameters:
t - the outermost exception
type - the type of exception to search for
Returns:
the first exception of the given type, if found, or null


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.