Class ThrowableUtil


  • public final class ThrowableUtil
    extends Object
    • Method Detail

      • haveSuppressed

        @Deprecated
        public static boolean haveSuppressed()
        Deprecated.
      • addSuppressed

        public static void addSuppressed​(Throwable target,
                                         Throwable suppressed)
      • addSuppressedAndClear

        public static void addSuppressedAndClear​(Throwable target,
                                                 List<Throwable> suppressed)
      • interruptAndAttachAsyncStackTrace

        public static void interruptAndAttachAsyncStackTrace​(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.
        Parameters:
        thread - The thread to interrupt.
        cause - The cause to attach a stack trace to.