On Mar 3, 2008, at 11:33 AM, [EMAIL PROTECTED] wrote:


Hi,

We are running Jess in an embedded mode where a separate processing
thread is executing runUntilHalt().  If an exception occurs in that
thread, we catch it and then the thread loops back to execute
runUntilHalt() again.

Is this a safe thing to do?  We are concerned however that the
internal (agenda) data structures might somehow get corrupted as a
result.


In general, that's fine. Of course, there are "exceptions" (sorry) to
the rule. I wouldn't do this with OutOfMemoryError or other Errors in
general. And some Jess exceptions are themselves indicators that
working memory has been corrupted -- if you incorrectly modify a
working memory element that's in use, Jess might tell you about this
with an exception, and so continuing might not be the best idea. But
once your code is debugged and believed to be correct, then catching
JessException and continuing is perfectly safe.


---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550                 http://www.jessrules.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]
--------------------------------------------------------------------

Reply via email to