summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/tools
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2010-03-09 17:51:19 +0000
committerArtur Signell <artur.signell@itmill.com>2010-03-09 17:51:19 +0000
commit233bb69d53632e5da7975ae128de98a4e3f87a01 (patch)
tree5d05f1fb8d813cdf37adbbaf9aa82c0c538b16c6 /src/com/vaadin/tools
parent01c553a622ed2e7b81f7382cb914eb092c89147e (diff)
downloadvaadin-framework-233bb69d53632e5da7975ae128de98a4e3f87a01.tar.gz
vaadin-framework-233bb69d53632e5da7975ae128de98a4e3f87a01.zip
Throw ExceptionInInitializerError instead of printing the stack trace to console.
svn changeset:11735/svn branch:6.3
Diffstat (limited to 'src/com/vaadin/tools')
-rw-r--r--src/com/vaadin/tools/ReflectTools.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/vaadin/tools/ReflectTools.java b/src/com/vaadin/tools/ReflectTools.java
index 2db10574ea..1fe36bd5e7 100644
--- a/src/com/vaadin/tools/ReflectTools.java
+++ b/src/com/vaadin/tools/ReflectTools.java
@@ -25,15 +25,16 @@ public class ReflectTools {
* @param parameterTypes
* The parameter types for the method.
* @return A reference to the method
+ * @throws ExceptionInInitializerError
+ * Wraps any exception in an {@link ExceptionInInitializerError}
+ * so this method can be called from a static initializer.
*/
public static Method findMethod(Class<?> cls, String methodName,
- Class<?>... parameterTypes) {
+ Class<?>... parameterTypes) throws ExceptionInInitializerError {
try {
return cls.getDeclaredMethod(methodName, parameterTypes);
} catch (Exception e) {
- // Print the stack trace as
- e.printStackTrace(System.err);
+ throw new ExceptionInInitializerError(e);
}
- return null;
}
}