OK, using exactly the same static class Message - I get an error returned from the builder.

Only thing I can think of is some error in the Eclipse setup, Drools runtime, classpath,...

I compile and run such small samples from a Linux shell command line, so I avoid all such possible problems.

-W

On 5 September 2012 17:01, Wolfgang Laun <wolfgang.laun@gmail.com> wrote:
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@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@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users