• 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: Handling exceptions in dispatchRequest
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling exceptions in dispatchRequest


  • Subject: Re: Handling exceptions in dispatchRequest
  • From: Zak Burke <email@hidden>
  • Date: Wed, 09 Feb 2005 14:19:13 -0500

Kaj Hejer wrote on 2/9/05 1:54 PM:
Hi!

In our WO5.2 applications we get

<html><head><title>Error</title></head><body>Your request produced an error.</body></html>

when trying to access the application f.x. if the database is down and there is thrown an exception in dispatchRequest.

From what I have understood a fix for this is to override dispatchRequest and add a try/catch block.

Other ideas? :)

In the catchblock we want to call our own Application.handleException(exception, context) but in dispatchRequest we don't have access to the context. Should we just create a new WOContext? How? :)

createContextForRequest(WORequest)) is a method on WOApplication you can use to create a new WOContext object to pass to your handleException method.


Documentation here:

http://developer.apple.com/documentation/WebObjects/Reference/API/com/webobjects/appserver/WOApplication.html#createContextForRequest(com.webobjects.appserver.WORequest)

zak.




TIA!


-Kaj :)

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Handling exceptions in dispatchRequest
      • From: Kaj Hejer <email@hidden>
References: 
 >Handling exceptions in dispatchRequest (From: Kaj Hejer <email@hidden>)

  • Prev by Date: Handling exceptions in dispatchRequest
  • Next by Date: Re: Handling exceptions in dispatchRequest
  • Previous by thread: Handling exceptions in dispatchRequest
  • Next by thread: Re: Handling exceptions in dispatchRequest
  • Index(es):
    • Date
    • Thread