Re: Handling exceptions in dispatchRequest
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