01: /*
02: * Created on Dec 9, 2004
03: */
04: package uk.org.ponder.webapputil;
05:
06: import uk.org.ponder.stringutil.StringList;
07:
08: /**
09: * A quick and dirty serialisable object designed to transport a stack
10: * trace between webapps. Used in the InformationServlet.
11: * @author Antranig Basman (antranig@caret.cam.ac.uk)
12: *
13: */
14: public class ErrorObject {
15: public String message;
16: public String handlerID;
17: public StringList stacktrace = new StringList();
18:
19: public ErrorObject() {
20: }
21:
22: public ErrorObject(String message, String handlerID, Throwable t) {
23: this .message = message;
24: this .handlerID = handlerID;
25: if (t != null) {
26: StackTraceElement[] trace = t.getStackTrace();
27: for (int i = 0; i < trace.length; ++i) {
28: stacktrace.add(trace[i].toString());
29: }
30: }
31: }
32: }
|