You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Jasper Rosenberg (JIRA)" <ji...@apache.org> on 2009/08/04 14:26:58 UTC

[jira] Created: (WW-3215) ActionComponent swallows exceptions

ActionComponent swallows exceptions
-----------------------------------

                 Key: WW-3215
                 URL: https://issues.apache.org/struts/browse/WW-3215
             Project: Struts 2
          Issue Type: Bug
          Components: Other
    Affects Versions: 2.1.7, 2.1.6
         Environment: Freemarker
            Reporter: Jasper Rosenberg
             Fix For: 2.0.15, 2.1.8


We render sub-portions of our pages using s.action.  Unfortunately, when one of these fails, rather than ending up with a 500 error (and in our own error/exception handling code), the user gets a partially rendered page.  This is because ActionComponent.executeAction() catches and logs all exceptions, but never rethrows them:

} catch (Exception e) {
            String message = "Could not execute action: " + namespace + "/" + actualName;
            LOG.error(message, e);
} 

There could be a parameter added of course to request that exceptions be swallowed for case where a partial render might be fine, or executeResult is false and they don't care if it fails, but it does seem like that would be better handled explicitly in the action being invoked instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WW-3215) ActionComponent swallows exceptions

Posted by "Wes Wannemacher (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-3215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wes Wannemacher resolved WW-3215.
---------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.0.15)
         Assignee: Wes Wannemacher

I added a parameter 'rethrowException' that, if set to 'true' will wrap and rethrow the exception caught while executing the target action. Please test and make sure it fits your needs.

> ActionComponent swallows exceptions
> -----------------------------------
>
>                 Key: WW-3215
>                 URL: https://issues.apache.org/struts/browse/WW-3215
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.1.6, 2.1.7
>         Environment: Freemarker
>            Reporter: Jasper Rosenberg
>            Assignee: Wes Wannemacher
>             Fix For: 2.1.8
>
>
> We render sub-portions of our pages using s.action.  Unfortunately, when one of these fails, rather than ending up with a 500 error (and in our own error/exception handling code), the user gets a partially rendered page.  This is because ActionComponent.executeAction() catches and logs all exceptions, but never rethrows them:
> } catch (Exception e) {
>             String message = "Could not execute action: " + namespace + "/" + actualName;
>             LOG.error(message, e);
> } 
> There could be a parameter added of course to request that exceptions be swallowed for case where a partial render might be fine, or executeResult is false and they don't care if it fails, but it does seem like that would be better handled explicitly in the action being invoked instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.