Author: hadrian
Date: Mon Apr 2 17:57:30 2012
New Revision: 1308442
URL: http://svn.apache.org/viewvc?rev=1308442&view=rev
Log:
Merged revisions 1298172 via svnmerge from
https://svn.apache.org/repos/asf/camel/trunk
........
r1298172 | davsclaus | 2012-03-07 17:30:44 -0500 (Wed, 07 Mar 2012) | 1 line
CAMEL-4230: Improved exception message if illegal access invoking a bean. Thanks to Michael
Warecki for the patch.
........
Modified:
camel/branches/camel-2.9.x/ (props changed)
camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java
Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java?rev=1308442&r1=1308441&r2=1308442&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java
(original)
+++ camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java
Mon Apr 2 17:57:30 2012
@@ -335,9 +335,11 @@ public class MethodInfo {
return Modifier.isStatic(method.getModifiers());
}
- protected Object invoke(Method mth, Object pojo, Object[] arguments, Exchange exchange)
throws IllegalAccessException, InvocationTargetException {
+ protected Object invoke(Method mth, Object pojo, Object[] arguments, Exchange exchange)
throws InvocationTargetException {
try {
return mth.invoke(pojo, arguments);
+ } catch (IllegalAccessException e) {
+ throw new RuntimeExchangeException("IllegalAccessException occurred invoking
method: " + mth + " using arguments: " + Arrays.asList(arguments), exchange, e);
} catch (IllegalArgumentException e) {
throw new RuntimeExchangeException("IllegalArgumentException occurred invoking
method: " + mth + " using arguments: " + Arrays.asList(arguments), exchange, e);
}
|