|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecter.extensions.foundation.ERXExceptionUtilities
public class ERXExceptionUtilities
Provides a set of utilities for displaying and managing exceptions.
Nested Class Summary | |
---|---|
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. |
Field Summary | |
---|---|
static org.apache.log4j.Logger |
log
|
Constructor Summary | |
---|---|
ERXExceptionUtilities()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.log4j.Logger log
Constructor Detail |
---|
public ERXExceptionUtilities()
Method Detail |
---|
protected static java.lang.Throwable getCause(java.lang.Throwable t)
t
- the original exception
public static java.lang.String toParagraph(java.lang.Throwable t)
t
- the throwable to convert to paragraph form
public 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 throwable
public 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 useProperties | |
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 |
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |