You can catch the consequence exception but writing a custom ConsequenceExceptionHandler and settting the ConsequenceExceptionHandlerOption on the the kb. <br><br>From there you are able to see what exception caused the problem, the rule where the exception originated, etc. and throw a different type of exception. You can&#39;t throw a checked exception from this handler, but you can throw custom runtime exception.<br>
<br>dave<br><br><div class="gmail_quote">On Fri, Jan 8, 2010 at 3:06 AM, Gerret Hansper <span dir="ltr">&lt;<a href="mailto:gerret.public@gmx.de">gerret.public@gmx.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
I have got a question about Exception handling policy in Drools 5.0.<br>
<br>
My issue is a case where a client application triggered rule execution on the<br>
server, which was throwing a ConsequenceException.<br>
The client, not having drools libs in its classpath, then had a<br>
ClassNotFoundException.<br>
I would therefore want to catch the ConsequenceException on the server and throw<br>
an Exception with its cause.<br>
I am not sure however if ConsequenceException.getCause() would always yield a<br>
non-drools Exception or if that might be another drools type.<br>
Also, is it always a ConsequenceException that gets thrown from a session or can<br>
there be other Exception types?<br>
<br>
Thanks,<br>
        Gerret<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br>