JessException has a method getNextException() (a synonym in Jess 6.1
is "getCause()" ). If this returns non-null, it's the "underlying
reason" that a JessException was thrown. Any catch blocks for
JessException should test the return value of this method and if it's
non-null, report that exception too. jess.Main does this, so if your
code were running from that, you'd see two stack traces: this one,
followed by another one that was thrown by the called method.

Section 4.1 of the Jess 6 manual covers this.

I think Richard Kasperowski wrote:
> Someone else on the development team changed a bean that I use for 
> definstance facts.  Now, sometimes when I definstance the object, I see 
> an error message like this:
> 
> Jess reported an error in routine DefinstanceList.createFact
>       while executing (definstance AlarmFaultData (fetch alarm)).
>    Message: Called method threw an exception.
>    Program text: ( definstance AlarmFaultData ( fetch alarm ) )  at line 1.
>       at jess.DefinstanceList.createFact(DefinstanceList.java:121)
>       at jess.DefinstanceList.definstance(DefinstanceList.java:176)
>       at jess.Rete.definstance(Rete.java:1134)
>       at jess.Definstance.call(ReflectFunctions.java:776)
>       at jess.FunctionHolder.call(FunctionHolder.java:37)
>       at jess.Funcall.execute(Funcall.java:270)
>       at jess.Jesp.parseAndExecuteFuncall(Jesp.java:1596)
>       at jess.Jesp.parseSexp(Jesp.java:183)
>       at jess.Jesp.parse(Jesp.java:62)
>       at jess.Rete.executeCommand(Rete.java:1205)
>       at 
> 
>com.giantloop.adapter.ext.expertSys.JessExpertSystem.assertFact(JessExpertSystem.java:295)
> 
> That's cool: the bean is now broken because one of its methods is 
> throwing an exception.
> 
> My problem is that the error message isn't verbose enough.  *Which* 
> method of which class threw what exception?  Can you consider this 
> enhancement request?  (I'm using Jess 6.0.)  (And I'm messing with the 
> Jess source code myself so I can identify and fix the culprit.)
> 
> Thanks,
> 
> -- 
> Richard Kasperowski
> Tel: 617-576-1552, Fax: 617-576-2441
> mailto:[EMAIL PROTECTED]
> http://www.altisimo.com/
> 
> --------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the list
> (use your own address!) List problems? Notify [EMAIL PROTECTED]
> --------------------------------------------------------------------
> 



---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550         http://herzberg.ca.sandia.gov

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to