| Modifier and Type | Method and Description |
|---|---|
static <T extends Throwable> |
maskException(Throwable t)
Mask a checked exception and throw it as an unchecked exception.
|
static void |
prependCurrentStackTrace(Throwable t)
Prepend stack frames from the current thread onto the given exception's stack frames.
|
public static <T extends Throwable> T maskException(Throwable t) throws T extends Throwable
T - unchecked exception typet - any exceptionT - alwaysT extends Throwablepublic static void prependCurrentStackTrace(Throwable t)
This is used to re-throw an exception created in another thread without losing the stack frame information associated with the current thread.
t - exception from another threadIllegalArgumentException - if t is nullCopyright © 2016. All rights reserved.