I think Diesler,Thomas wrote:
> hallo,
> 
> Jess responds with an error when (assert-string ...) is called twice with
> the same argument.
> 
> Workaround: call retract-string before assert-string (just in case)?
> 
> Jess> (assert-string "(foo bar)")
> <Fact-0>
> Jess> (assert-string "(foo bar)")
> Jess reported an error in routine Value.factValue
>         while executing (assert-string "(foo bar)").
>   Message: Not a fact: "FALSE" (type = ATOM).


I agree that this is not the correct behavior -- I'll fix it. Thanks
for the report.

A better workaround, for now, would be to catch and hide the
exception (Jess errors are always Java exceptions:)

(try (assert-string "(foo bar)") catch)

 -or-

(deffunction safe-assert-string(?string)
        (try (assert-string ?string) catch))





---------------------------------------------------------
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