public class ERXExceptionUtilities
extends java.lang.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.
|
| Modifier and Type | Field and Description |
|---|---|
static org.apache.log4j.Logger |
log |
| Constructor and Description |
|---|
ERXExceptionUtilities() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
_printSingleStackTrace(java.lang.Throwable t,
java.io.PrintWriter writer,
int exceptionDepth,
boolean cleanupStackTrace) |
protected static java.lang.Throwable |
getCause(java.lang.Throwable t)
Returns the cause of an exception.
|
static java.lang.Throwable |
getMeaningfulThrowable(java.lang.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(java.lang.Throwable t)
Prints the given throwable to the console (stdout).
|
static void |
printStackTrace(java.lang.Throwable t,
java.io.OutputStream os)
Prints the given throwable to the given outputstream.
|
static void |
printStackTrace(java.lang.Throwable t,
java.io.PrintWriter writer)
Prints the given throwable to the given printwriter.
|
static void |
printStackTrace(java.lang.Throwable t,
java.io.PrintWriter writer,
int exceptionDepth)
Prints the given throwable to the given writer with an indent.
|
static void |
printStackTrace(java.lang.Throwable t,
java.io.Writer writer)
Prints the given throwable to the given printwriter.
|
static java.lang.String |
toParagraph(java.lang.Throwable t)
Returns a paragraph form of the given throwable.
|
static java.lang.String |
toParagraph(java.lang.Throwable t,
boolean removeHtmlTags)
Returns a paragraph form of the given throwable.
|
protected static java.lang.Throwable getCause(java.lang.Throwable t)
t - the original exceptionpublic static java.lang.String toParagraph(java.lang.Throwable t)
t - the throwable to convert to paragraph formpublic static java.lang.String toParagraph(java.lang.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 java.lang.Throwable getMeaningfulThrowable(java.lang.Throwable t)
t - the meaningful exception given another throwablepublic static void printStackTrace()
public static void logStackTrace()
public static void printStackTrace(java.lang.Throwable t)
t - the throwable to printpublic static void printStackTrace(java.lang.Throwable t,
java.io.OutputStream os)
t - the throwable to printos - the stream to print topublic static void printStackTrace(java.lang.Throwable t,
java.io.Writer writer)
t - the throwable to printwriter - the writer to print topublic static void printStackTrace(java.lang.Throwable t,
java.io.PrintWriter writer)
t - the throwable to printwriter - the writer to print toprotected static void _printSingleStackTrace(java.lang.Throwable t,
java.io.PrintWriter writer,
int exceptionDepth,
boolean cleanupStackTrace)
public static void printStackTrace(java.lang.Throwable t,
java.io.PrintWriter writer,
int exceptionDepth)
t - the throwable to printwriter - the writer to print toexceptionDepth - the indent level to use| Properties | |
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 – 2022 Project Wonder.