org.jclouds.util
Class Throwables2
java.lang.Object
org.jclouds.util.Throwables2
public class Throwables2
- extends Object
General utilities used in jclouds code.
- Author:
- Adrian Cole
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Throwables2
public Throwables2()
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.