public class ERXExceptionUtilities extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ERXExceptionUtilities.HideStackTraceException
Wraps a root cause, but does not render a stack trace to the given
writer.
|
static interface |
ERXExceptionUtilities.WeDontNeedAStackTraceException
Implemented by any exception that you explicitly want to not appear in
stack dumps.
|
Constructor and Description |
---|
ERXExceptionUtilities() |
Modifier and Type | Method and Description |
---|---|
protected static void |
_printSingleStackTrace(Throwable t,
PrintWriter writer,
int exceptionDepth,
boolean cleanupStackTrace) |
protected static Throwable |
getCause(Throwable t)
Returns the cause of an exception.
|
static Throwable |
getMeaningfulThrowable(Throwable t)
Returns the "meaningful" root cause from a throwable.
|
static void |
logStackTrace()
Logs a debug stack trace.
|
static void |
printStackTrace()
Prints a debug stack trace to the console.
|
static void |
printStackTrace(Throwable t)
Prints the given throwable to the console (stdout).
|
static void |
printStackTrace(Throwable t,
OutputStream os)
Prints the given throwable to the given outputstream.
|
static void |
printStackTrace(Throwable t,
PrintWriter writer)
Prints the given throwable to the given printwriter.
|
static void |
printStackTrace(Throwable t,
PrintWriter writer,
int exceptionDepth)
Prints the given throwable to the given writer with an indent.
|
static void |
printStackTrace(Throwable t,
Writer writer)
Prints the given throwable to the given printwriter.
|
static String |
toParagraph(Throwable t)
Returns a paragraph form of the given throwable.
|
static String |
toParagraph(Throwable t,
boolean removeHtmlTags)
Returns a paragraph form of the given throwable.
|
protected static Throwable getCause(Throwable t)
t
- the original exceptionpublic static String toParagraph(Throwable t)
t
- the throwable to convert to paragraph formpublic static String toParagraph(Throwable t, boolean removeHtmlTags)
t
- the throwable to convert to paragraph formremoveHtmlTags
- if true, html tags will be filtered from the error messages (to remove, for instance, bold tags from validation messages)public static Throwable getMeaningfulThrowable(Throwable t)
t
- the meaningful exception given another throwablepublic static void printStackTrace()
public static void logStackTrace()
public static void printStackTrace(Throwable t)
t
- the throwable to printpublic static void printStackTrace(Throwable t, OutputStream os)
t
- the throwable to printos
- the stream to print topublic static void printStackTrace(Throwable t, Writer writer)
t
- the throwable to printwriter
- the writer to print topublic static void printStackTrace(Throwable t, PrintWriter writer)
t
- the throwable to printwriter
- the writer to print toprotected static void _printSingleStackTrace(Throwable t, PrintWriter writer, int exceptionDepth, boolean cleanupStackTrace)
public static void printStackTrace(Throwable t, PrintWriter writer, int exceptionDepth)
t
- the throwable to printwriter
- the writer to print toexceptionDepth
- the indent level to useName | Description |
---|---|
er.extensions.stackTrace.cleanup | if true, stack traces are cleaned up for easier use |
er.extensions.stackTrace.skipPatternsFile | the name the resource that contains an array of class name and method regexes to skip in stack traces |
Copyright © 2002 – 2024 Project Wonder.