(no commit message)
[utils] / support / cdi / src / main / java / org / wamblee / cdi / CdiInjector.java
index b0ce90713cb3988ae6f236fb34955b743a3d26a8..ccf716c97d988de7ce0c2bcec3ba844bacf45831 100644 (file)
@@ -56,7 +56,7 @@ public class CdiInjector implements Injector {
     public void inject(Object aComponent) {
         if (aComponent != null) {
             if (!clazz.isInstance(aComponent)) {
-                throw new RuntimeException("Object '" + aComponent +
+                throw new IllegalArgumentException("Object '" + aComponent +
                     "' is of type " + aComponent.getClass().getName() +
                     " but expected " + clazz.getName());
             }