Enhydra 5.1 API

org.enhydra.error
Class ChainedThrowableSupport

java.lang.Object
  |
  +--org.enhydra.error.ChainedThrowableSupport

public final class ChainedThrowableSupport
extends java.lang.Object

Static methods used to implement the Chained* throwables.


Method Summary
static java.lang.String getLocalizedMessage(ChainedThrowable except, java.lang.String superMsg)
          Get the localhist message associated with this exception.
static java.lang.String getMessage(ChainedThrowable except, java.lang.String superMsg)
          Get the message associated with this exception.
static java.lang.String makeMessage(java.lang.Throwable cause)
          Generate the message to set for the exception message when an explict message is not available.
static void printCauseTrace(ChainedThrowable except)
          Prints stacktrace and cause stacktrace.
static void printCauseTrace(ChainedThrowable except, java.io.PrintStream s)
          Prints stacktrace and cause stacktrace.
static void printCauseTrace(ChainedThrowable except, java.io.PrintWriter out)
          Prints stacktrace and cause stacktrace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

makeMessage

public static java.lang.String makeMessage(java.lang.Throwable cause)
Generate the message to set for the exception message when an explict message is not available. The message is derived from the causing exception. Used to support constructor that take only a cause Throwable as an argument. This method is used to generate the message to has to the super constructor.

Parameters:
cause - The causing exception, which maybe null.

getMessage

public static java.lang.String getMessage(ChainedThrowable except,
                                          java.lang.String superMsg)
Get the message associated with this exception.

Parameters:
except - The chained throwable generating the message.
superMsg - The result of super.getMessage(), so that the contained messages is available. Maybe null.

getLocalizedMessage

public static java.lang.String getLocalizedMessage(ChainedThrowable except,
                                                   java.lang.String superMsg)
Get the localhist message associated with this exception.

Parameters:
except - The chained throwable generating the message.
superMsg - The result of super.getLocalizedMessage(), so that the contained messages is available. Maybe null.

printCauseTrace

public static void printCauseTrace(ChainedThrowable except)
Prints stacktrace and cause stacktrace.


printCauseTrace

public static void printCauseTrace(ChainedThrowable except,
                                   java.io.PrintStream s)
Prints stacktrace and cause stacktrace.


printCauseTrace

public static void printCauseTrace(ChainedThrowable except,
                                   java.io.PrintWriter out)
Prints stacktrace and cause stacktrace.


Enhydra 5.1 API