cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1381621 - in /cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension: Extension.java Messages.properties
Date Thu, 06 Sep 2012 14:24:58 GMT
Author: dkulp
Date: Thu Sep  6 14:24:57 2012
New Revision: 1381621

URL: http://svn.apache.org/viewvc?rev=1381621&view=rev
Log:
Better error messages if extension class can be loaded, but object cannot be instantiated

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/Messages.properties

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java?rev=1381621&r1=1381620&r2=1381621&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java Thu Sep  6
14:24:57 2012
@@ -185,8 +185,8 @@ public class Extension {
         return clazz;
     }
     public Object load(ClassLoader cl, Bus b) {
+        Class<?> cls = getClassObject(cl);
         try {
-            Class<?> cls = getClassObject(cl);
             if (notFound) {
                 return null;
             }
@@ -223,9 +223,9 @@ public class Extension {
         } catch (ExtensionException ex) {
             throw ex;
         } catch (IllegalAccessException ex) {
-            throw new ExtensionException(ex);
+            throw new ExtensionException(new Message("PROBLEM_CREATING_EXTENSION_CLASS",
LOG, cls.getName()), ex);
         } catch (InstantiationException ex) {
-            throw new ExtensionException(ex);
+            throw new ExtensionException(new Message("PROBLEM_CREATING_EXTENSION_CLASS",
LOG, cls.getName()), ex);
         }
         return obj;
     }

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/Messages.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/Messages.properties?rev=1381621&r1=1381620&r2=1381621&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/Messages.properties (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/Messages.properties Thu Sep
 6 14:24:57 2012
@@ -19,4 +19,5 @@
 #
 #
 DEPRECATED_EXTENSIONS = Loading Bus extensions via {0} (found url {1}) is deprecated.  Use
{2} instead.
-PROBLEM_LOADING_EXTENSION_CLASS = Could not load extension class {0}.
\ No newline at end of file
+PROBLEM_LOADING_EXTENSION_CLASS = Could not load extension class {0}.
+PROBLEM_CREATING_EXTENSION_CLASS = Could not create object of extension class {0}.
\ No newline at end of file



Mime
View raw message