title: JBoss drools map line number from consequence exception to the actual rule consequence
body: <p>I am using  JBoss drools 5.1. My problem is when the consequence of the rule throws exception, it is hard to understand the line which caused the problem. For example in the below rule, it throws exception -</p>
  
  <pre><code>rule "exception handling"
  when
  then
      String str = null;
      str.length();
  end
  </code></pre>
  
  <p>Below is the exception stack</p>
  
  <pre><code>Caused by: org.drools.runtime.rule.ConsequenceException: rule: exception handling
  
          at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
          at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:927)
          at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:856)
          at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1071)
          at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:785)
          at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:751)
          at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:218)... 26 more
  Caused by: java.lang.NullPointerException
          at defaultpkg.Rule_exception_handling_0.defaultConsequence(Rule_exception_handling_0.java:8)
          at defaultpkg.Rule_exception_handling_0DefaultConsequenceInvoker.evaluate(Rule_exception_handling_0DefaultConsequenceInvoker.java:24)
          at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:917)
          ... 32 more
  </code></pre>
  
  <p>How to map the line number 8 to the line that caused the exception (in this case str.length())?</p>