Package io.netty.util.internal
Class ThrowableUtil
- java.lang.Object
-
- io.netty.util.internal.ThrowableUtil
-
public final class ThrowableUtil extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
addSuppressed(java.lang.Throwable target, java.lang.Throwable suppressed)
static void
addSuppressed(java.lang.Throwable target, java.util.List<java.lang.Throwable> suppressed)
static void
addSuppressedAndClear(java.lang.Throwable target, java.util.List<java.lang.Throwable> suppressed)
static java.lang.Throwable[]
getSuppressed(java.lang.Throwable source)
static boolean
haveSuppressed()
Deprecated.static java.lang.String
stackTraceToString(java.lang.Throwable cause)
Gets the stack trace from a Throwable as a String.static <T extends java.lang.Throwable>
TunknownStackTrace(T cause, java.lang.Class<?> clazz, java.lang.String method)
Set theStackTraceElement
for the givenThrowable
, using theClass
and method name.
-
-
-
Method Detail
-
unknownStackTrace
public static <T extends java.lang.Throwable> T unknownStackTrace(T cause, java.lang.Class<?> clazz, java.lang.String method)
Set theStackTraceElement
for the givenThrowable
, using theClass
and method name.
-
stackTraceToString
public static java.lang.String stackTraceToString(java.lang.Throwable cause)
Gets the stack trace from a Throwable as a String.- Parameters:
cause
- theThrowable
to be examined- Returns:
- the stack trace as generated by
Throwable.printStackTrace(java.io.PrintWriter)
method.
-
haveSuppressed
@Deprecated public static boolean haveSuppressed()
Deprecated.
-
addSuppressed
public static void addSuppressed(java.lang.Throwable target, java.lang.Throwable suppressed)
-
addSuppressedAndClear
public static void addSuppressedAndClear(java.lang.Throwable target, java.util.List<java.lang.Throwable> suppressed)
-
addSuppressed
public static void addSuppressed(java.lang.Throwable target, java.util.List<java.lang.Throwable> suppressed)
-
getSuppressed
public static java.lang.Throwable[] getSuppressed(java.lang.Throwable source)
-
-