You can catch the consequence exception but writing a custom ConsequenceExceptionHandler and settting the ConsequenceExceptionHandlerOption on the the kb.

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't throw a checked exception from this handler, but you can throw custom runtime exception.

dave

On Fri, Jan 8, 2010 at 3:06 AM, Gerret Hansper <gerret.public@gmx.de> wrote:
Hello,
I have got a question about Exception handling policy in Drools 5.0.

My issue is a case where a client application triggered rule execution on the
server, which was throwing a ConsequenceException.
The client, not having drools libs in its classpath, then had a
ClassNotFoundException.
I would therefore want to catch the ConsequenceException on the server and throw
an Exception with its cause.
I am not sure however if ConsequenceException.getCause() would always yield a
non-drools Exception or if that might be another drools type.
Also, is it always a ConsequenceException that gets thrown from a session or can
there be other Exception types?

Thanks,
       Gerret

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users