public final class ExceptionUtils
extends java.lang.Object
Throwable
objects.Modifier and Type | Method and Description |
---|---|
static java.lang.Exception |
createMasqueradingExceptionIfNeeded(java.lang.Exception exception,
java.util.Collection<java.lang.String> acceptedPackages)
Analyzes given exception and makes it independent to packages outside the
specified collection or
java.lang, ch.systemsx.cisd.common . |
static java.lang.Throwable |
getEndOfChain(java.lang.Throwable throwable)
Returns the last
Throwable of a chain of throwables. |
static <T extends java.lang.Throwable> |
tryGetThrowableOfClass(java.lang.Throwable throwable,
java.lang.Class<T> clazz)
Returns the first found
Throwable of given clazz from the
exception chain of given throwable. |
public static final java.lang.Exception createMasqueradingExceptionIfNeeded(java.lang.Exception exception, java.util.Collection<java.lang.String> acceptedPackages)
java.lang, ch.systemsx.cisd.common
.public static final <T extends java.lang.Throwable> T tryGetThrowableOfClass(java.lang.Throwable throwable, java.lang.Class<T> clazz)
Throwable
of given clazz from the
exception chain of given throwable.public static java.lang.Throwable getEndOfChain(java.lang.Throwable throwable)
Throwable
of a chain of throwables.