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>
com.google.common.base.Predicate<Throwable>
containsThrowable(Class<T> throwableType)
           
static
<T extends Throwable>
T
getFirstThrowableOfType(com.google.inject.CreationException e, Class<T> clazz)
           
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 extends Throwable>
T
getFirstThrowableOfType(TransformParallelException e, 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

containsThrowable

public static <T extends Throwable> com.google.common.base.Predicate<Throwable> containsThrowable(Class<T> throwableType)

getFirstThrowableOfType

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

getFirstThrowableOfType

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

getFirstThrowableOfType

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

getFirstThrowableOfType

public static <T extends Throwable> T getFirstThrowableOfType(com.google.inject.CreationException 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-2012 jclouds. All Rights Reserved.