Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Include Stack Trace on Custom Error Page



The source for that page is also provided with WO. Look in
/Developer/Examples/JavaWebObjects/Source/JavaWOExtensions/ ExceptionPages.subproj/


Chuck

On May 26, 2004, at 4:02 AM, Dirk Bajohr wrote:

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.
_______________________________________________
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.


References: 
 >Include Stack Trace on Custom Error Page (From: Hunter Hillegas <email@hidden>)
 >Re: Include Stack Trace on Custom Error Page (From: Dirk Bajohr <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.