Top Constructors Methods
io.netty.util.internal

public final Class ThrowableUtil

extends Object
Class Inheritance
Imports
java.io.ByteArrayOutputStream, .IOException, .PrintStream, java.util.List

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
addSuppressed(Throwable target, Throwable suppressed)

public static void
addSuppressed(Throwable target, List<Throwable> suppressed)

public static void
public static Throwable[]
public static boolean
public static String

Returns:

the stack trace as generated by Throwable#printStackTrace(java.io.PrintWriter) method.
stackTraceToString
(Throwable
the Throwable to be examined
cause
)

Gets the stack trace from a Throwable as a String.

public static <T extends Throwable> T
unknownStackTrace(T cause, Class<?> clazz, String method)

Set the StackTraceElement for the given Throwable, using the Class and method name.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ThrowableUtilback to summary
private ThrowableUtil()

Method Detail

addSuppressedback to summary
public static void addSuppressed(Throwable target, Throwable suppressed)
Annotations
@SuppressJava6Requirement
reason:Throwable addSuppressed is only available for >= 7. Has check for < 7.
addSuppressedback to summary
public static void addSuppressed(Throwable target, List<Throwable> suppressed)
addSuppressedAndClearback to summary
public static void addSuppressedAndClear(Throwable target, List<Throwable> suppressed)
getSuppressedback to summary
public static Throwable[] getSuppressed(Throwable source)
Annotations
@SuppressJava6Requirement
reason:Throwable getSuppressed is only available for >= 7. Has check for < 7.
haveSuppressedback to summary
public static boolean haveSuppressed()
stackTraceToStringback to summary
public static String stackTraceToString(Throwable cause)

Gets the stack trace from a Throwable as a String.

Parameters
cause:Throwable

the Throwable to be examined

Returns:String

the stack trace as generated by Throwable#printStackTrace(java.io.PrintWriter) method.

unknownStackTraceback to summary
public static <T extends Throwable> T unknownStackTrace(T cause, Class<?> clazz, String method)

Set the StackTraceElement for the given Throwable, using the Class and method name.