Package com.jogamp.common
Class ExceptionUtils
- java.lang.Object
-
- com.jogamp.common.ExceptionUtils
-
public class ExceptionUtils extends Object
- Since:
- 2.3.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ExceptionUtils.CustomStackTrace
Interface allowingThrowable
specializations to provide their custom stack trace presentation.
-
Constructor Summary
Constructors Constructor Description ExceptionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
dumpStack(PrintStream out)
static void
dumpStack(PrintStream out, int skip, int depth)
static void
dumpStack(PrintStream out, StackTraceElement[] stack, int skip, int depth)
static void
dumpStack(PrintStream out, Throwable t, int skip, int depth)
static void
dumpThrowable(String additionalDescr, Throwable t)
Dumps aThrowable
toSystem.err
in a decorating message including the current thread name, and itsstack trace
.static void
dumpThrowable(String additionalDescr, Throwable t, int causeDepth, int stackDepth)
Dumps aThrowable
toSystem.err
in a decorating message including the current thread name, and itsstack trace
.static int
printCause(PrintStream s, String causeStr, Throwable cause, int causeIdx, int causeDepth, int stackDepth)
static void
printStackTrace(PrintStream s, Throwable t, int causeDepth, int stackDepth)
-
-
-
Method Detail
-
dumpStack
public static void dumpStack(PrintStream out)
-
dumpStack
public static void dumpStack(PrintStream out, int skip, int depth)
-
dumpStack
public static void dumpStack(PrintStream out, Throwable t, int skip, int depth)
-
dumpStack
public static void dumpStack(PrintStream out, StackTraceElement[] stack, int skip, int depth)
-
printCause
public static int printCause(PrintStream s, String causeStr, Throwable cause, int causeIdx, int causeDepth, int stackDepth)
- Parameters:
s
- output streamcauseStr
- the cause titlecause
- theThrowable
cause for outputcauseIdx
- the cause index over all causes known by callercauseDepth
- the maximum depth for causes, or-1
for allstackDepth
- the maximum depth for stack entries, or-1
for all- Since:
- 2.3.2
-
printStackTrace
public static void printStackTrace(PrintStream s, Throwable t, int causeDepth, int stackDepth)
- Parameters:
s
- output streamt
- theThrowable
for outputcauseDepth
- the maximum depth for causes, or-1
for allstackDepth
- the maximum depth for stack entries, or-1
for all- Since:
- 2.3.2
-
dumpThrowable
public static void dumpThrowable(String additionalDescr, Throwable t)
Dumps aThrowable
toSystem.err
in a decorating message including the current thread name, and itsstack trace
.Implementation will iterate through all
causes
.
-
dumpThrowable
public static void dumpThrowable(String additionalDescr, Throwable t, int causeDepth, int stackDepth)
Dumps aThrowable
toSystem.err
in a decorating message including the current thread name, and itsstack trace
.Implementation will iterate through all
causes
.
-
-