• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Include Stack Trace on Custom Error Page
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Include Stack Trace on Custom Error Page


  • Subject: Re: Include Stack Trace on Custom Error Page
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 26 May 2004 07:34:04 -0700

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>)

  • Prev by Date: Re: WOLongResponse and EO processing
  • Next by Date: How to count the source code line?
  • Previous by thread: Re: Include Stack Trace on Custom Error Page
  • Next by thread: Interface workflow, GoLive/DreamWeaver, and WO?
  • Index(es):
    • Date
    • Thread