com.fullspan.util
Class ExceptionUtil

java.lang.Object
  extended bycom.fullspan.util.ExceptionUtil

public class ExceptionUtil
extends java.lang.Object

Static utility methods for exceptions (this class has a private constructor and cannot be instantiated).

Version:
$Revision: 1.4 $, $Date: 2005/02/09 06:59:09 $
Author:
Mitch Stuart

Method Summary
static java.lang.String getExceptionMessage(java.lang.Throwable t)
          Return the message for a Throwable.
static java.lang.String getExceptionMessage(java.lang.Throwable t, boolean reportRootCause)
          Return the message for a Throwable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getExceptionMessage

public static java.lang.String getExceptionMessage(java.lang.Throwable t)
Return the message for a Throwable.

Equivalent to calling getExceptionMessage(t, true)

Parameters:
t - the Throwable whose message will be returned
Returns:
the message
See Also:
getExceptionMessage(Throwable, boolean)

getExceptionMessage

public static java.lang.String getExceptionMessage(java.lang.Throwable t,
                                                   boolean reportRootCause)
Return the message for a Throwable.

First, the Throwable whose message to return is selected.

Second, the message for the selected Throwable is computed.

Parameters:
t - the Throwable whose message will be returned
reportRootCause - if true, then getCause is called in a loop to get the inner-most root cause Throwable, and the message is returned for that Throwable. If false, the message is returned for the original passed-in Throwable.
Returns:
the message