Top Inners Constructors Methods
com.jogamp.common

public Class ExceptionUtils

extends Object
Class Inheritance
Imports
java.io.PrintStream

Since
2.3.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
ExceptionUtils.CustomStackTrace

Interface allowing Throwable specializations to provide their custom stack trace presentation.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
public static void
dumpStack(final PrintStream out, final int skip, final int depth)

public static void
dumpStack(final PrintStream out, final Throwable t, final int skip, final int depth)

public static void
dumpStack(final PrintStream out, final StackTraceElement[] stack, final int skip, final int depth)

public static void
dumpThrowable(final String
additional text placed before the Throwable details.
additionalDescr
,
final Throwable
the Throwable for output
t
)

Dumps a Throwable to System.err in a decorating message including the current thread name, and its stack trace.

public static void
dumpThrowable(final String
additional text placed before the Throwable details.
additionalDescr
,
final Throwable
the Throwable for output
t
,
final int
the maximum depth for causes, or -1 for all
causeDepth
,
final int
the maximum depth for stack entries, or -1 for all
stackDepth
)

Dumps a Throwable to System.err in a decorating message including the current thread name, and its stack trace.

public static int
printCause(final PrintStream
output stream
s
,
final String
the cause title
causeStr
,
Throwable
the Throwable cause for output
cause
,
final int
the cause index over all causes known by caller
causeIdx
,
final int
the maximum depth for causes, or -1 for all
causeDepth
,
final int
the maximum depth for stack entries, or -1 for all
stackDepth
)

Prints the given Throwable cause to the output PrintStream s.

public static void
printStackTrace(final PrintStream
output stream
s
,
final Throwable
the Throwable for output
t
,
final int
the maximum depth for causes, or -1 for all
causeDepth
,
final int
the maximum depth for stack entries, or -1 for all
stackDepth
)

Prints the given Throwable to the output PrintStream s.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ExceptionUtilsback to summary
public ExceptionUtils()

Method Detail

dumpStackback to summary
public static void dumpStack(final PrintStream out)
dumpStackback to summary
public static void dumpStack(final PrintStream out, final int skip, final int depth)
dumpStackback to summary
public static void dumpStack(final PrintStream out, final Throwable t, final int skip, final int depth)
dumpStackback to summary
public static void dumpStack(final PrintStream out, final StackTraceElement[] stack, final int skip, final int depth)
dumpThrowableback to summary
public static void dumpThrowable(final String additionalDescr, final Throwable t)

Dumps a Throwable to System.err in a decorating message including the current thread name, and its stack trace.

Implementation will iterate through all causes.

Parameters
additionalDescr:String

additional text placed before the Throwable details.

t:Throwable

the Throwable for output

dumpThrowableback to summary
public static void dumpThrowable(final String additionalDescr, final Throwable t, final int causeDepth, final int stackDepth)

Dumps a Throwable to System.err in a decorating message including the current thread name, and its stack trace.

Implementation will iterate through all causes.

Parameters
additionalDescr:String

additional text placed before the Throwable details.

t:Throwable

the Throwable for output

causeDepth:int

the maximum depth for causes, or -1 for all

stackDepth:int

the maximum depth for stack entries, or -1 for all

Since
2.3.2
printCauseback to summary
public static int printCause(final PrintStream s, final String causeStr, Throwable cause, final int causeIdx, final int causeDepth, final int stackDepth)

Prints the given Throwable cause to the output PrintStream s.

Parameters
s:PrintStream

output stream

causeStr:String

the cause title

cause:Throwable

the Throwable cause for output

causeIdx:int

the cause index over all causes known by caller

causeDepth:int

the maximum depth for causes, or -1 for all

stackDepth:int

the maximum depth for stack entries, or -1 for all

Since
2.3.2
printStackTraceback to summary
public static void printStackTrace(final PrintStream s, final Throwable t, final int causeDepth, final int stackDepth)

Prints the given Throwable to the output PrintStream s.

Parameters
s:PrintStream

output stream

t:Throwable

the Throwable for output

causeDepth:int

the maximum depth for causes, or -1 for all

stackDepth:int

the maximum depth for stack entries, or -1 for all

Since
2.3.2
com.jogamp.common back to summary

public Interface ExceptionUtils.CustomStackTrace

Known Direct Implementers
com.jogamp.common.util.SourcedInterruptedException

Interface allowing Throwable specializations to provide their custom stack trace presentation.
Since
2.3.2

Method Summary

Modifier and TypeMethod and Description
public void
printCauseStack(final PrintStream
output stream
s
,
final String
the cause title
causeStr
,
final int
the cause index over all causes known by caller
causeIdx
,
final int
the maximum depth for stack entries, or -1 for all
stackDepth
)

Prints this Throwable as a cause to the output PrintStream s, not iterating over all inner causes!

public void
printStackTrace(final PrintStream
output stream
s
,
final int
the maximum depth for causes, or -1 for all
causeDepth
,
final int
the maximum depth for stack entries, or -1 for all
stackDepth
)

Custom printStackTrace method, similar to Throwable#printStackTrace(PrintStream, int, int).

Method Detail

printCauseStackback to summary
public void printCauseStack(final PrintStream s, final String causeStr, final int causeIdx, final int stackDepth)

Prints this Throwable as a cause to the output PrintStream s, not iterating over all inner causes!

Parameters
s:PrintStream

output stream

causeStr:String

the cause title

causeIdx:int

the cause index over all causes known by caller

stackDepth:int

the maximum depth for stack entries, or -1 for all

Since
2.3.2
printStackTraceback to summary
public void printStackTrace(final PrintStream s, final int causeDepth, final int stackDepth)

Custom printStackTrace method, similar to Throwable#printStackTrace(PrintStream, int, int).

Parameters
s:PrintStream

output stream

causeDepth:int

the maximum depth for causes, or -1 for all

stackDepth:int

the maximum depth for stack entries, or -1 for all