[rules-users] Drools fusion how to I catch an Exception
Wolfgang Laun
wolfgang.laun at gmail.com
Wed Sep 5 11:01:20 EDT 2012
There's another thing I changed which might have an impact: I changed
Message to be a class on its own Message.java file. It's possible that MVEL
is
confused by that and runs into a bug.
Try this, please.
-W
On 5 September 2012 16:08, RichardAmbridge <richard.ambridge at gmail.com>wrote:
> I have tried with 5.3.0 and 5.4.0, each time I run it the getErrors is
> blank
> (and hasErrors() is false)
>
> So the compile is always passing for me.
>
>
> However, when I run it under 5.4.0 (was using 5.3.0) I now get in the
> output:
> Inserting message
> Fire all rules
> Hello added
> Sleep 10
> After5 then start
> Unable to execute timer job!
> Exception executing consequence for rule "After5" in com.sample: [Error:
> unable to resolve method: org.drools.base.DefaultKnowledgeHelper.$m()
> [arglength=0]]
> [Near : {... System.out.println( "After5 th ....}]
> ^
> [Line: 1, Column: 1]
> at
>
> org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
> at
> org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1283)
> at
>
> org.drools.common.DefaultAgenda.fireTimedActivation(DefaultAgenda.java:1330)
> .....etc...
>
>
> So in 5.4.0 the exception is caught someplace inside drools and printed to
> the output.
>
> My question still remains, how can I get notified in my code that an
> exception has happened?
>
> Thanks for the replies,
> Ric
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Drools-fusion-how-to-I-catch-an-Exception-tp4019597p4019604.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120905/df17cd3b/attachment.html
More information about the rules-users
mailing list