Mailing List webobjects-dev@wocommunity.org Message #93
From: Markus Ruggiero (rucotec) <webobjects-dev@wocommunity.org>
Subject: Uncatchable Exception somewhere in DirectAction/D2W
Date: Wed, 3 Mar 2021 15:41:51 +0100
To: <webobjects-dev@wocommunity.org>
Signed Data (Text SHA256)
I have a direct action that crashes and I cannot catch the exception. Why?

Scenario:

/**
 * dummy to demonstrate the issue
 */
public class DirectAction extends ERD2WDirectAction {

    public WOActionResults crashAction() throws Exception {
     throw new Exception("Crash in DirectAction");
    }
}

Where can I catch this Exception? It does not trigger anything in Application (which extends ERXApplication)
Both handle...() methods do not respond.

@Override
public WOResponse handleActionRequestError(WORequest aRequest, Exception exception, String reason,
WORequestHandler aHandler, String actionClassName, String actionName, Class actionClass,
WOAction actionInstance) {
// TODO Auto-generated method stub
return super.handleActionRequestError(aRequest, exception, reason, aHandler, actionClassName, actionName, actionClass,
actionInstance);
}

@Override
public WOResponse handleException(Exception anException, WOContext aContext)
{
super.handleException(anException, aContext);
        .......

The result of the crash is er.directtoweb.pages.templates.ERD2WMessagePageTemplate being rendered with my PageWrapper.

As there is (I assume) not much D2W involved here how do I trap this error and handle it my way? What am I missing?

Thanks for any idea
---markus---


Markus Ruggiero


rucotec GmbH                        web https://rucotec.ch
Steinenvorstadt 79                email markus.ruggiero@rucotec.ch
4051 Basel / Switzerland         mobile +41 79 508 4701








Content Unaltered as verified By:
<markus.ruggiero@rucotec.ch>
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster