| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Helper pour simplifier l'implémentation de toute exception implémentant l'interface NestedException.
Avec ce helper, une nested-exception s'implémente :
public class MyNestedException
extends Exception
implements NestedException
{
private Throwable nestedThrowable;
public MyNestedException(String message, Throwable nestedThrowable) {
super(message);
this.nestedThrowable = nestedThrowable;
}
public Throwable getNestedThrowable() {
return nestedThrowable;
}
public void printStackTrace(java.io.PrintStream s) {
synchronized(s) {
NestedException.Helper.printNestedStackTrace(s, this);
super.printStackTrace(s);
}
}
public void printStackTrace(java.io.PrintWriter w) {
synchronized(w) {
NestedException.Helper.printNestedStackTrace(w, this);
super.printStackTrace(w);
}
}
public String toString() {
return NestedException.Helper.toString(this, super.toString());
}
}
| Method Summary | |
static Throwable | getInitialNestedThrowable(Throwable t)Parcourt tout l'arbre des exception chaînées, afin d'en tirer la cause initiale. |
static void | printNestedStackTrace(PrintStream s, NestedException ne) |
static void | printNestedStackTrace(PrintWriter w, NestedException ne) |
static void | printStackTrace(PrintWriter w, Throwable t)Cette methode nous permet d'ecrire une stack trace complete dans l'API servlet 2.2. |
static String | toString(NestedException ne, String superToString) |
| Method Detail |
public static Throwable getInitialNestedThrowable(Throwable t)
public static void printNestedStackTrace(PrintStream s, NestedException ne)
public static void printNestedStackTrace(PrintWriter w, NestedException ne)
public static void printStackTrace(PrintWriter w, Throwable t)
public static String toString(NestedException ne, String superToString)
| Dependency Links |
to Class org.orange.util.NestedException
to Class java.lang.Throwable
to Class java.io.PrintWriter
to Class java.lang.String
to Class javax.servlet.ServletException
to Class java.sql.SQLException
to Class Diagram org.orange.util
to Class Diagram org.orange
to Class Diagram org
to Class Diagram <default>
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||