Re: Application.dispatchRequest does not catch InvocationTargetException
Re: Application.dispatchRequest does not catch InvocationTargetException
- Subject: Re: Application.dispatchRequest does not catch InvocationTargetException
- From: Alan Ward <email@hidden>
- Date: Thu, 26 May 2005 10:20:41 -0600
My guess (without seeing the code for the superclass) is that
UIOApplication is catching (and consuming) it.
You can also override
public WOActionResults performActionNamed(String anActionName) {
try {
super.performActionNamed(anActionName)
} catch (Exception e) {
// do your stuff here
}
}
In your DirectAction class.
Alan
On May 26, 2005, at 9:57 AM, Kaj Hejer wrote:
Hi!
If I try to go
http://myserver.myhost.no/cgi-bin/WebObjects/myapp.woa/wa/
justgarabage
I get the following in my log:
[2005-05-26 17:50:19 MEST] <WorkerThread2>
<com.webobjects.appserver._private.WODirectActionRequestHandler>:
Exception while handling action named "dsadf" on action class
"null" :java.lang.reflect.InvocationTargetException
[2005-05-26 17:50:19 MEST] <WorkerThread2>
java.lang.reflect.InvocationTargetException
at
com.webobjects.appserver._private.WOActionRequestHandler._handleReques
t(WOActionRequestHandler.java:250)
at
com.webobjects.appserver._private.WOActionRequestHandler.handleRequest
(WOActionRequestHandler.java:142)
at com.webobjects.appserver.WOApplication.dispatchRequest
(WOApplication.java:1306)
at UIOApplication.dispatchRequest(UIOApplication.java:119)
at Application.dispatchRequest(Application.java:134)
at com.webobjects.appserver._private.WOWorkerThread.runOnce
(WOWorkerThread.java:173)
at com.webobjects.appserver._private.WOWorkerThread.run
(WOWorkerThread.java:254)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.NoSuchMethodException: DirectAction.
justgarabageAction()
at
com.webobjects.appserver.WODirectAction.performActionNamed
(WODirectAction.java:125)
at
com.webobjects.appserver._private.WOActionRequestHandler._handleReques
t(WOActionRequestHandler.java:240)
... 7 more
even when I have the following method in my Application (or in
UIOApplication which is the superclass foor my Application):
public WOResponse dispatchRequest(WORequest request) {
try {
return super.dispatchRequest(request);
} catch (Exception e) {
System.err.println("dispatchRequest: " + e);
e.printStackTrace();
WOContext context = createContextForRequest(request);
return handleException(e, context);
}
}
From what I can understand it is thrown a InvocationTargetException
inside super.dispatchRequest(request) but this exception isn't
catched by my try/catch block.
Why?
TIA for any comments!
-Kaj :)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
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