[jboss-svn-commits] JBL Code SVN: r18874 - labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Mar 12 00:55:01 EDT 2008


Author: michael.neale at jboss.com
Date: 2008-03-12 00:55:01 -0400 (Wed, 12 Mar 2008)
New Revision: 18874

Modified:
   labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/EvalCondition.java
Log:
JBRULES-1452 Better NPE error reporting thanks to Mike McMahon

Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/EvalCondition.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/EvalCondition.java	2008-03-12 04:43:36 UTC (rev 18873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/EvalCondition.java	2008-03-12 04:55:01 UTC (rev 18874)
@@ -2,13 +2,13 @@
 
 /*
  * Copyright 2005 JBoss Inc
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,7 +27,7 @@
 
 public class EvalCondition extends ConditionalElement {
     /**
-     * 
+     *
      */
     private static final long          serialVersionUID = 400L;
 
@@ -65,7 +65,7 @@
     public Declaration[] getRequiredDeclarations() {
         return this.requiredDeclarations;
     }
-    
+
     public Object createContext() {
         return this.expression.createContext();
     }
@@ -79,7 +79,7 @@
                                              workingMemory,
                                              context );
         } catch ( final Exception e ) {
-            throw new RuntimeDroolsException( e );
+        	throw new RuntimeDroolsException( this.getEvalExpression() + " : " + e );
         }
     }
 




More information about the jboss-svn-commits mailing list