I think Kelvin Rawls wrote:
> Jess reported an error in routine Tokenizer.nextChar
> while executing (read ?inStream)
> while executing (bind ?eventCode (read ?inStream))
> while executing (while (and (<> 0 (str-compare ?eventCode
> "EOF")) (<> 0 (str-compare ?eventCode "AEND"))) do (processEventCode
> ?logID ?outStream ?system State ?eventCode) (printout t "Processed
> code: " ?eventCode crlf) (bind ?eventCo de (read ?inStream)))
> while executing deffunction logicAgent
> while executing (logicAgent).
> Message: Error on input stream.
> ....
>
> Any help appreciated. I have tried with and without buffers on
> writer and reader. Different size buffers. AsConsole or not.
> readline, in all above combinations. Works better with ssmall
> buffers.
Look at section 4.1 of the Jess 6.1 manual, where it talks about
JessExceptions:
Another important tip: the JessException class has a method
getNextException which returns non-null when a particular
JessException is a wrapper for another kind of exception. For
example, if you use the Jess function call to call a function
that throws an exception, then call will throw a JessException,
and calling JessException.getNextException() will return the real
exception that was thrown. Your JessException handlers should
always check getNextException(); if your handler simply displays
a thrown exception, then it should display the return value of
getNextException(), too.
That's what's happening here: the stream is throwing an
IOException, and Jess is just passing it along. Fix your catch block
to report the nested exception and you'll find out what's going wrong.
---------------------------------------------------------
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]
--------------------------------------------------------------------