Class ThrowableUtil
java.lang.Object
io.netty.util.internal.ThrowableUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddSuppressed(Throwable target, Throwable suppressed) static voidaddSuppressed(Throwable target, List<Throwable> suppressed) static voidaddSuppressedAndClear(Throwable target, List<Throwable> suppressed) static Throwable[]getSuppressed(Throwable source) static booleanstatic voidinterruptAndAttachAsyncStackTrace(Thread thread, Throwable cause) Capture the stack trace of the given thread, interrupt it, and attach the stack trace as a suppressed exception to the given cause.static StringstackTraceToString(Throwable cause) Gets the stack trace from a Throwable as a String.static <T extends Throwable>
TunknownStackTrace(T cause, Class<?> clazz, String method)
-
Method Details
-
unknownStackTrace
-
stackTraceToString
Gets the stack trace from a Throwable as a String.- Parameters:
cause- theThrowableto be examined- Returns:
- the stack trace as generated by
Throwable.printStackTrace(java.io.PrintWriter)method.
-
haveSuppressed
public static boolean haveSuppressed() -
addSuppressed
-
addSuppressedAndClear
-
addSuppressed
-
getSuppressed
-
interruptAndAttachAsyncStackTrace
Capture the stack trace of the given thread, interrupt it, and attach the stack trace as a suppressed exception to the given cause.- Parameters:
thread- The thread to interrupt.cause- The cause to attach a stack trace to.
-