Error does not stop the process, but it occured (when device is unplugged) ! I guess, in another thread.
AStream_Error occured only after whole buffer is empty.
And to work correctly - i need to catch it and stop the stream. But how to do it ?
This one is raised in B4J, but only all the system serial buffer is empty, 20-30 seconds processing is going on.
But is it possible to catch "java.lang.NegativeArraySizeException" error ?
This one is raised in B4J, but only all the system serial buffer is empty, 20-30 seconds processing is going on.
But is it possible to catch "java.lang.NegativeArraySizeException" error ?
This error, which happens on a different thread, should be caught by AsyncStreams and lead to the Terminated or Error events being raised. Are you handling both events?
If internally in the lib to catch NegativeArraySizeException error and raise the _Error or _Terminated immediately - it will be correct, i think - as the port is immediately out.
But ... it will lead to incompatibility with old lib behaviour when this error did not crash the app. Maybe a new event to be added ?