You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Maurizio Cucchiara (JIRA)" <ji...@apache.org> on 2011/01/14 11:19:46 UTC

[jira] Commented: (WW-3559) PrepareInterceptor is eating exceptions that occur in prepare{methodName} methods

    [ https://issues.apache.org/jira/browse/WW-3559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981703#action_12981703 ] 

Maurizio Cucchiara commented on WW-3559:
----------------------------------------

I'm sorry but your patch changes the default behavior.
If for some reason the PrefixMethodInvocationUtil.invokePrefixMethod method raises an InvocationTargetException, the prepare method of called action will no longer be called (code comments: just in case there's an exception while doing reflection, we still want prepare() to be able to get called).

There is also a lost of informations,  at this time every intercepted exception gives a self explanatory warning.   

> PrepareInterceptor is eating exceptions that occur in prepare{methodName} methods
> ---------------------------------------------------------------------------------
>
>                 Key: WW-3559
>                 URL: https://issues.apache.org/jira/browse/WW-3559
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.2.1, 2.2.1.1
>         Environment: All
>            Reporter: Greg Lindholm
>            Assignee: Maurizio Cucchiara
>         Attachments: PrepareInterceptor_patch.txt
>
>
> The PrepareInterceptor is eating any exceptions that occur when calling prepare{MethodName} methods.
> It is catching the exceptions and simply logging a warning then continuing. 
> It should be re-throwing these exception so that normal exception handling login (i.e. the Exception Interceptor) is performed.
> Exceptions that occur in the prepare() method are (correctly) not caught but those in the prepare{MethodName) methods are being caught and ignored.
> I have a patch that corrects this bug.

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