Re: Include Stack Trace on Custom Error Page
Re: Include Stack Trace on Custom Error Page
- Subject: Re: Include Stack Trace on Custom Error Page
- From: Dirk Bajohr <email@hidden>
- Date: Wed, 26 May 2004 13:02:43 +0200
Sure, create a StringWriter and a PrintWriter and use
exception.printStackTrace(pw);
My method looks similar to this:
public String getStackTrace(Exception exception) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
exception.printStackTrace(pw);
pw.flush();
pw.close();
sw.flush();
sw.close();
return sw.toString();
}
Bind the method to a WOString in your component. You need to import
java.io.* for the Writers.
Cheers,
Dirk
Am 26.05.2004 um 06:03 schrieb Hunter Hillegas:
Is there an easy way to include the stack trace that is on the Apple
supplied error page on a custom error page?
Hunter
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
--
Dirk Bajohr
iSOLUTION - Individuelle Software fuer moderne Kommunikation
Hauptstr. 50
53757 Sankt Augustin
T +49 2241 921567-0
F +49 2241 921567-89
http://www.isolution.de
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.