Closed chasersmith closed 11 months ago
Found where to catch the exception. The exception is being called in my port reader stream listener, handled by invoking onError callback.
_reader = SerialPortReader(_port, timeout: 10);
_reader.stream.listen((event) {
print('Incoming bytes: ${event.toList()}');
}, onError: (error) => print(error));
I am unsure if this is a bug or a misunderstanding from me but, when I close a port via
port.close()
, a SerialPortError exception is thrown with the message, "The operation completed successfully. erno = 0".The stack trace provides little information with no trace to my code.
I have tried wrapping the
close()
call in a try/catch statement which isn't catching the exception.