Does anyone have an example of specifying a ConsequenceExceptionHandler? I'd like to see if using one can help me do something but I can't find anywhere in the API to set one! Are custom ConsequenceExceptionHandlers discouraged?
Brandon David Sinclair-2 wrote: > > 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 <[email protected]> > 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 -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Exception-handling-policy-tp113782p871223.html Sent from the Drools - User mailing list archive at Nabble.com. _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
