camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles Letare (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-5598) BeanProcessor - InvocationTargetException propagates cause instead of target
Date Wed, 12 Sep 2012 10:14:08 GMT

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

Gilles Letare updated CAMEL-5598:
---------------------------------

    Description: 
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}

  was:
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:
try {
    ...
    value = invocation.proceed(callback, sync);
    ...
} catch (InvocationTargetException e) {
    exchange.setException(e.getCause());
    ...
}

I think it should be:
} catch (InvocationTargetException e) {
    exchange.setException(e.getTargetException());
    ...
}

    
> 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
>            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

Mime
View raw message