jaulib v1.3.0
Jau Support Library (C++, Java, ..)
Classes | Static Public Member Functions | List of all members
org.jau.lang.ExceptionUtils Class Reference
Collaboration diagram for org.jau.lang.ExceptionUtils:

Classes

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

Static Public Member Functions

static void dumpStack (final PrintStream out)
 
static void dumpStack (final PrintStream out, final int skip, final int depth)
 
static void dumpStack (final PrintStream out, final Throwable t, final int skip, final int depth)
 
static void dumpStack (final PrintStream out, final StackTraceElement[] stack, final int skip, final int depth)
 
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. More...
 
static void printStackTrace (final PrintStream s, final Throwable t, final int causeDepth, final int stackDepth)
 Prints the given Throwable to the output PrintStream s. More...
 
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. More...
 
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. More...
 

Detailed Description

Since
0.3.0

Definition at line 33 of file ExceptionUtils.java.

Member Function Documentation

◆ dumpStack() [1/4]

static void org.jau.lang.ExceptionUtils.dumpStack ( final PrintStream  out)
static

Definition at line 34 of file ExceptionUtils.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dumpStack() [2/4]

static void org.jau.lang.ExceptionUtils.dumpStack ( final PrintStream  out,
final int  skip,
final int  depth 
)
static

Definition at line 37 of file ExceptionUtils.java.

Here is the call graph for this function:

◆ dumpStack() [3/4]

static void org.jau.lang.ExceptionUtils.dumpStack ( final PrintStream  out,
final StackTraceElement[]  stack,
final int  skip,
final int  depth 
)
static

Definition at line 43 of file ExceptionUtils.java.

◆ dumpStack() [4/4]

static void org.jau.lang.ExceptionUtils.dumpStack ( final PrintStream  out,
final Throwable  t,
final int  skip,
final int  depth 
)
static

Definition at line 40 of file ExceptionUtils.java.

Here is the call graph for this function:

◆ dumpThrowable() [1/2]

static void org.jau.lang.ExceptionUtils.dumpThrowable ( final String  additionalDescr,
final Throwable  t 
)
static

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
additionalDescradditional text placed before the Throwable details.
tthe Throwable for output

Definition at line 133 of file ExceptionUtils.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dumpThrowable() [2/2]

static void org.jau.lang.ExceptionUtils.dumpThrowable ( final String  additionalDescr,
final Throwable  t,
final int  causeDepth,
final int  stackDepth 
)
static

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
additionalDescradditional text placed before the Throwable details.
tthe Throwable for output
causeDepththe maximum depth for causes, or -1 for all
stackDepththe maximum depth for stack entries, or -1 for all
Since
0.3.0

Definition at line 148 of file ExceptionUtils.java.

Here is the call graph for this function:

◆ printCause()

static int org.jau.lang.ExceptionUtils.printCause ( final PrintStream  s,
final String  causeStr,
Throwable  cause,
final int  causeIdx,
final int  causeDepth,
final int  stackDepth 
)
static

Prints the given Throwable cause to the output PrintStream s.

Parameters
soutput stream
causeStrthe cause title
causethe Throwable cause for output
causeIdxthe cause index over all causes known by caller
causeDepththe maximum depth for causes, or -1 for all
stackDepththe maximum depth for stack entries, or -1 for all
Since
0.3.0

Definition at line 92 of file ExceptionUtils.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printStackTrace()

static void org.jau.lang.ExceptionUtils.printStackTrace ( final PrintStream  s,
final Throwable  t,
final int  causeDepth,
final int  stackDepth 
)
static

Prints the given Throwable to the output PrintStream s.

Parameters
soutput stream
tthe Throwable for output
causeDepththe maximum depth for causes, or -1 for all
stackDepththe maximum depth for stack entries, or -1 for all
Since
0.3.0

Definition at line 114 of file ExceptionUtils.java.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: