no reason to throw an hard to interpret NPE late, better raising an exception as soon as classes cannot be load, much easier to debug - rule init and rule invocation could happen in different times

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/digester/trunk@1142095 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/commons/digester3/CallMethodRule.java b/src/main/java/org/apache/commons/digester3/CallMethodRule.java
index 3c7cfff..a480825 100644
--- a/src/main/java/org/apache/commons/digester3/CallMethodRule.java
+++ b/src/main/java/org/apache/commons/digester3/CallMethodRule.java
@@ -342,10 +342,11 @@
                 }
                 catch ( ClassNotFoundException e )
                 {
+                    String errorMessage = format( "[CallMethodRule] Cannot load class %s at position %s",
+                                                  this.paramClassNames[i], i );
                     // use the digester log
-                    digester.getLogger().error( format( "[CallMethodRule] Cannot load class %s",
-                                                        this.paramClassNames[i] ), e );
-                    this.paramTypes[i] = null; // Will cause NPE later
+                    digester.getLogger().error( errorMessage, e );
+                    throw new RuntimeException( errorMessage, e );
                 }
             }
         }