org.alfresco.error
Class ExceptionStackUtil

java.lang.Object
  extended by org.alfresco.error.ExceptionStackUtil

public class ExceptionStackUtil
extends java.lang.Object

Helper class to provide information about exception stacks.


Constructor Summary
ExceptionStackUtil()
           
 
Method Summary
static java.lang.Throwable getCause(java.lang.Throwable throwable, java.lang.Class[] possibleCauses)
          Searches through the exception stack of the given throwable to find any instance of the possible cause.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionStackUtil

public ExceptionStackUtil()
Method Detail

getCause

public static java.lang.Throwable getCause(java.lang.Throwable throwable,
                                           java.lang.Class[] possibleCauses)
Searches through the exception stack of the given throwable to find any instance of the possible cause. The top-level throwable will also be tested.

Parameters:
throwable - the exception condition to search
possibleCauses - the types of the exception conditions of interest
Returns:
Returns the first instance that matches one of the given possible types, or null if there is nothing in the stack


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.