You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Babak Vahdat (JIRA)" <ji...@apache.org> on 2012/09/12 13:33:07 UTC

[jira] [Resolved] (CAMEL-5598) BeanProcessor - InvocationTargetException propagates cause instead of target

     [ https://issues.apache.org/jira/browse/CAMEL-5598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Babak Vahdat resolved CAMEL-5598.
---------------------------------

    Resolution: Not A Problem
    
> BeanProcessor - InvocationTargetException propagates cause instead of target
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-5598
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5598
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.10.0
>            Reporter: Gilles Letare
>            Assignee: Babak Vahdat
>            Priority: Trivial
>
> In BeanProcessor.process, InvocationTargetException's are caught, but the exception set on the exchange is the cause instead of the target.
> See lines 164-180 on version 2.10.0:
> {code}
> try {
>     ...
>     value = invocation.proceed(callback, sync);
>     ...
> } catch (InvocationTargetException e) {
>     exchange.setException(e.getCause());
>     ...
> }
> {code}
> I think it should be:
> {code}
> } catch (InvocationTargetException e) {
>     exchange.setException(e.getTargetException());
>     ...
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira