Made the logging of invocation target exceptions more explicit.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@955926 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/DependencyBase.java b/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/DependencyBase.java
index 3728ed3..e76c93a 100644
--- a/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/DependencyBase.java
+++ b/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/DependencyBase.java
@@ -1,5 +1,7 @@
package org.apache.felix.dm.impl.dependencies;
+import java.lang.reflect.InvocationTargetException;
+
import org.apache.felix.dm.dependencies.Dependency;
import org.apache.felix.dm.impl.InvocationUtil;
import org.apache.felix.dm.impl.Logger;
@@ -37,8 +39,12 @@
catch (NoSuchMethodException e) {
// if the method does not exist, ignore it
}
+ catch (InvocationTargetException e) {
+ // the method itself threw an exception, log that
+ m_logger.log(Logger.LOG_WARNING, "Invocation of '" + methodName + "' failed.", e.getCause());
+ }
catch (Exception e) {
- m_logger.log(Logger.LOG_WARNING, "Invocation of '" + methodName + "' failed.", e);
+ m_logger.log(Logger.LOG_WARNING, "Could not invoke '" + methodName + "'.", e);
}
}
}