ERXExceptionUtilities Class Reference

Collaboration diagram for ERXExceptionUtilities:

Collaboration graph
[legend]

List of all members.

Classes

class  HideStackTraceException
interface  WeDontNeedAStackTraceException

Static Public Member Functions

static Throwable getMeaningfulThrowable (Throwable t)
static void logStackTrace ()
static void printStackTrace (Throwable t, PrintWriter writer, int exceptionDepth)
static void printStackTrace (Throwable t, PrintWriter writer)
static void printStackTrace (Throwable t, Writer writer)
static void printStackTrace (Throwable t, OutputStream os)
static void printStackTrace (Throwable t)
static void printStackTrace ()
static String toParagraph (Throwable t, boolean removeHtmlTags)
static String toParagraph (Throwable t)

Static Public Attributes

static final Logger log = Logger.getLogger(ERXExceptionUtilities.class)

Static Protected Member Functions

static void _printSingleStackTrace (Throwable t, PrintWriter writer, int exceptionDepth, boolean cleanupStackTrace)
static Throwable getCause (Throwable t)

Static Private Attributes

static NSArray< Pattern > _skipPatterns


Detailed Description

Provides a set of utilities for displaying and managing exceptions.

Author:
mschrag

Member Function Documentation

static void _printSingleStackTrace ( Throwable  t,
PrintWriter  writer,
int  exceptionDepth,
boolean  cleanupStackTrace 
) [static, protected]

static Throwable getCause ( Throwable  t  )  [static, protected]

Returns the cause of an exception. This should be modified to be pluggable.

Parameters:
t the original exception
Returns:
the cause of the exception or null of there isn't one

static Throwable getMeaningfulThrowable ( Throwable  t  )  [static]

Returns the "meaningful" root cause from a throwable. For instance, an InvocationTargetException is useless -- it's the cause that matters.

Parameters:
t the meaningful exception given another throwable
Returns:
the meaningful exception

static void logStackTrace (  )  [static]

Logs a debug stack trace.

static void printStackTrace ( Throwable  t,
PrintWriter  writer,
int  exceptionDepth 
) [static]

static void printStackTrace ( Throwable  t,
PrintWriter  writer 
) [static]

Prints the given throwable to the given printwriter.

Parameters:
t the throwable to print
writer the writer to print to

static void printStackTrace ( Throwable  t,
Writer  writer 
) [static]

Prints the given throwable to the given printwriter.

Parameters:
t the throwable to print
writer the writer to print to

static void printStackTrace ( Throwable  t,
OutputStream  os 
) [static]

Prints the given throwable to the given outputstream.

Parameters:
t the throwable to print
os the stream to print to

static void printStackTrace ( Throwable  t  )  [static]

Prints the given throwable to the console (stdout).

Parameters:
t the throwable to print

static void printStackTrace (  )  [static]

Prints a debug stack trace to the console.

static String toParagraph ( Throwable  t,
boolean  removeHtmlTags 
) [static]

Returns a paragraph form of the given throwable.

Parameters:
t the throwable to convert to paragraph form
removeHtmlTags if true, html tags will be filtered from the error messages (to remove, for instance, bold tags from validation messages)
Returns:
the paragraph string

static String toParagraph ( Throwable  t  )  [static]

Returns a paragraph form of the given throwable.

Parameters:
t the throwable to convert to paragraph form
Returns:
the paragraph string


Member Data Documentation

NSArray<Pattern> _skipPatterns [static, private]

final Logger log = Logger.getLogger(ERXExceptionUtilities.class) [static]


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

Generated on Sat May 26 06:43:12 2012 for Project Wonder by  doxygen 1.5.8