Package org.jclouds.util
Class Throwables2
- java.lang.Object
-
- org.jclouds.util.Throwables2
-
public class Throwables2 extends Object
General utilities used in jclouds code.
-
-
Constructor Summary
Constructors Constructor Description Throwables2()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends Throwable>
com.google.common.base.Predicate<Throwable>containsThrowable(Class<T> throwableType)static <T extends Throwable>
TgetFirstThrowableOfType(Throwable from, Class<T> clazz)static <T> TpropagateAuthorizationOrOriginalException(Exception e)static voidpropagateIfPossible(Throwable exception, Iterable<com.google.common.reflect.TypeToken<? extends Throwable>> throwables)
-
-
-
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)
-
propagateAuthorizationOrOriginalException
public static <T> T propagateAuthorizationOrOriginalException(Exception e)
-
-