| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static < The exception type T extends Throwable> T | Returns: The resolved exceptionThe current exception current, T The extra/new exception extra)Used to "accumulate" exceptions of the same type. |
| public static Throwable | Returns: The effective exception - same as input if not a wrapperThe original t)Throwable - ignored if nullAttempts to get to the "effective" exception being thrown, by taking care of some known exceptions that wrap the original thrown one. |
| public static Throwable | Returns: IfThrowable#getCause() is non-null then the cause, otherwise the original exception -
null if the original exception was nullThe original t)Throwable - ignored if null
|
| public static void | |
| public static RuntimeException | Returns: The thrown cause if already a runtime exception, otherwise a runtime exception of the resolved exception as its causeThe original thrown exception t, boolean Whether to determine the root cause by "peeling" any enclosing exceptions peelThrowable)Converts a thrown generic exception to a |
| public static RuntimeException |
| ExceptionUtils | back to summary |
|---|---|
| private ExceptionUtils() | |
| accumulateException | back to summary |
|---|---|
| public static <T extends Throwable> T accumulateException(T current, T extra) Used to "accumulate" exceptions of the same type. If the current exception is
| |
| peelException | back to summary |
|---|---|
| public static Throwable peelException(Throwable t) Attempts to get to the "effective" exception being thrown, by taking care of some known exceptions that wrap the original thrown one. | |
| resolveExceptionCause | back to summary |
|---|---|
public static Throwable resolveExceptionCause(Throwable t)
| |
| rethrowAsIoException | back to summary |
|---|---|
| public static void rethrowAsIoException(Throwable e) throws IOException | |
| toRuntimeException | back to summary |
|---|---|
| public static RuntimeException toRuntimeException(Throwable t, boolean peelThrowable) Converts a thrown generic exception to a
| |
| toRuntimeException | back to summary |
|---|---|
| public static RuntimeException toRuntimeException(Throwable t) | |