<div>Hi, </div>
<div>&nbsp;</div>
<div>Anyone knows how to catch the exception when firing the rules? </div>
<div>&nbsp;</div>
<div>I wrapped the session.fireAllRules() method using try...catch, however it doesn&#39;t work: when someone wrote&nbsp;bad code in the rule&#39;s action part, the Exception will be thrown and printed to the stderr, and this will make the rule engine stop working --&nbsp;the try...catch outside doesn&#39;t help anything. 
</div>
<div>&nbsp;</div>
<div>If&nbsp;&nbsp;the exception&nbsp;thrown from&nbsp;the rule&#39;s action part&nbsp;can be caught externally,&nbsp;the system can be protected from interrupting Exception.</div>
<div>
<p><font style="BACKGROUND-COLOR: #ffffff" face="courier new,monospace" color="#3333ff">try {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _log.debug(&quot;Firing rules in : &quot; + getName());</font></p>
<p><font style="BACKGROUND-COLOR: #ffffff" face="courier new,monospace" color="#3333ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session.fireAllRules();</font></p>
<p><font style="BACKGROUND-COLOR: #ffffff" face="courier new,monospace" color="#3333ff">} catch (Exception e) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _log.info(&quot;Error when firing rules: &quot;, e);<br>}</font> <br></p>
<p>Thanks, <br>Yang</p></div>