org.enhydra.error
Class ChainedThrowableSupport

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

public final class ChainedThrowableSupport
extends Object

Static methods used to implement the Chained* throwables.


Method Summary
static String getLocalizedMessage(ChainedThrowable except, String superMsg)
          Get the localhist message associated with this exception.
static String getMessage(ChainedThrowable except, String superMsg)
          Get the message associated with this exception.
static String makeMessage(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, PrintStream s)
          Prints stacktrace and cause stacktrace.
static void printCauseTrace(ChainedThrowable except, 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 String makeMessage(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 String getMessage(ChainedThrowable except,
                                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 String getLocalizedMessage(ChainedThrowable except,
                                         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,
                                   PrintStream s)
Prints stacktrace and cause stacktrace.

printCauseTrace

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


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.