|
EchoPoint API - 3.0.0b5 App Webcontainer |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectechopoint.util.throwable.ThrowableKit
public class ThrowableKit
ThrowableKit provides helper methods for handling Exceptions
in Echo web applications. It is expecially useful for allowing JDK 1.4
exception chaining while still retaining a JDK 1.3 compliant code base.
| Method Summary | |
|---|---|
static Throwable |
attachCause(Throwable throwable,
Throwable cause)
This method attempts to attach the cause Throwable to the provided Throwable. |
static ThrowableDescriptor |
describeThrowable(Throwable throwable)
This method will examine a Throwable and return a ThrowableDescriptor that can then be used to output error details. |
static Throwable |
initCause(Throwable throwable,
Throwable cause)
Short hand method for ThrowableKit.attachCause(throwable, cause); |
static RuntimeException |
makeRuntimeException(String message,
Throwable cause)
This method creates a RuntimeException that will attach the root cause if you are running under JDK 1.4 or later. |
static RuntimeException |
makeRuntimeException(Throwable cause)
A short cut method for ThrowableKit.makeRuntimeException(null,cause); |
static Throwable |
makeThrowable(Class throwableClass,
String message,
Throwable cause)
This method creates a Throwable derived object that will attach the root cause if you are running under JDK 1.4 or later. |
static Throwable |
makeThrowable(Class throwableClass,
Throwable cause)
Short hand method for ThrowableKit.makeThrowable(throwableClass, null,cause); |
static void |
printThrowableDescription(Throwable throwable,
PrintStream out)
Shorthand method for ThrowableKit.printThrowableDescription(throwable,out,true); |
static void |
printThrowableDescription(Throwable throwable,
PrintStream out,
boolean indent)
Prints a textual description of a Throwable and its properties, causes and stack traces. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Throwable makeThrowable(Class throwableClass,
String message,
Throwable cause)
throwableClass - - must be a class derived from Throwable.classmessage - - a custom error message, can be null.cause - - the root cause Throwable
public static Throwable makeThrowable(Class throwableClass,
Throwable cause)
throwableClass - - must be a class derived from Throwable.classcause - - the root cause Throwable
makeThrowable(Class, String, Throwable)
public static RuntimeException makeRuntimeException(String message,
Throwable cause)
message - - a custom error message, can be null.cause - - the root cause Throwable
public static RuntimeException makeRuntimeException(Throwable cause)
cause - the root cause Throwablew to attach
makeRuntimeException(String, Throwable)
public static Throwable attachCause(Throwable throwable,
Throwable cause)
This method can be called at most once on an Throwable. It is
generally called from within the constructor, or immediately after
creating the throwable. If this throwable was created with Throwable.Throwable(Throwable) or Throwable.Throwable(String,Throwable),
this method has no effect since the cause has already been set.
throwable - the target Throwablecause - the root cause Throwablew to attach
public static Throwable initCause(Throwable throwable,
Throwable cause)
throwable - the target Throwablecause - the root cause Throwablew to attach
attachCause(Throwable, Throwable),
Throwable.initCause(java.lang.Throwable)public static ThrowableDescriptor describeThrowable(Throwable throwable)
throwable - - the Throwable to examine
public static void printThrowableDescription(Throwable throwable,
PrintStream out,
boolean indent)
throwable - - the Throwable in questionout - - the PrintStream to write toindent - - control whether tab indents will be used
public static void printThrowableDescription(Throwable throwable,
PrintStream out)
printThrowableDescription(Throwable, PrintStream,
boolean)
|
EchoPoint API - 3.0.0b5 App Webcontainer |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||