Class ExceptionUtils

java.lang.Object
com.jogamp.common.ExceptionUtils

public class ExceptionUtils extends Object
Since:
2.3.0
  • Constructor Details

    • ExceptionUtils

      public ExceptionUtils()
  • Method Details

    • 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)
      Prints the given Throwable cause to the output PrintStream s.
      Parameters:
      s - output stream
      causeStr - the cause title
      cause - the Throwable cause for output
      causeIdx - the cause index over all causes known by caller
      causeDepth - the maximum depth for causes, or -1 for all
      stackDepth - 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)
      Prints the given Throwable to the output PrintStream s.
      Parameters:
      s - output stream
      t - the Throwable for output
      causeDepth - the maximum depth for causes, or -1 for all
      stackDepth - the maximum depth for stack entries, or -1 for all
      Since:
      2.3.2
    • dumpThrowable

      public static void dumpThrowable(String additionalDescr, 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 - additional text placed before the Throwable details.
      t - the Throwable for output
    • dumpThrowable

      public static void dumpThrowable(String additionalDescr, Throwable t, int causeDepth, 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 - additional text placed before the Throwable details.
      t - the Throwable for output
      causeDepth - the maximum depth for causes, or -1 for all
      stackDepth - the maximum depth for stack entries, or -1 for all
      Since:
      2.3.2