org.jclouds.util
Class Throwables2

java.lang.Object
  extended by org.jclouds.util.Throwables2

public class Throwables2
extends Object

General utilities used in jclouds code.

Author:
Adrian Cole

Constructor Summary
Throwables2()
           
 
Method Summary
static
<T extends Throwable>
T
getFirstThrowableOfType(com.google.inject.ProvisionException e, Class<T> clazz)
           
static
<T extends Throwable>
T
getFirstThrowableOfType(Throwable from, Class<T> clazz)
           
static
<T> T
propagateAuthorizationOrOriginalException(Exception e)
           
static
<T> T
propagateOrNull(Exception from)
           
static Exception returnFirstExceptionIfInListOrThrowStandardExceptionOrCause(Class[] exceptionTypes, Exception exception)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Throwables2

public Throwables2()
Method Detail

getFirstThrowableOfType

public static <T extends Throwable> T getFirstThrowableOfType(Throwable from,
                                                              Class<T> clazz)

getFirstThrowableOfType

public static <T extends Throwable> T getFirstThrowableOfType(com.google.inject.ProvisionException e,
                                                              Class<T> clazz)

propagateOrNull

public static <T> T propagateOrNull(Exception from)

returnFirstExceptionIfInListOrThrowStandardExceptionOrCause

public static Exception returnFirstExceptionIfInListOrThrowStandardExceptionOrCause(Class[] exceptionTypes,
                                                                                    Exception exception)
                                                                             throws Exception
Throws:
Exception

propagateAuthorizationOrOriginalException

public static <T> T propagateAuthorizationOrOriginalException(Exception e)


Copyright © 2009-2011 jclouds. All Rights Reserved.