-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[digiplex] Fix exception handling in sender and receiver threads #17829
base: main
Are you sure you want to change the base?
[digiplex] Fix exception handling in sender and receiver threads #17829
Conversation
416f9d4
to
b9cbdec
Compare
Signed-off-by: Robert Michalak <[email protected]>
b9cbdec
to
2d6ab72
Compare
Which unexpected exception have you observed? |
Honestly, I don't remember now. I'm the original author of this binding and I had this fix applied in my environment for a long time (just forgot to push it to remote). As far as I remember, my alarm system is sending some rubbish over RS232 from time to time and then parsing may fail in many unexpected ways. that's why I have this |
It seems that this fix will potentially hide parser bugs, for example Line 60 in 388dc6b
when Line 42 in 388dc6b
If you cannot fix that now, perhaps you could catch it closer to where it is expected to happen: Line 190 in 388dc6b
and log it so that "evidence" could be collected for further analysis and fixing. For example, something like this: DigiplexResponse response;
try {
response = DigiplexResponseResolver.resolveResponse(message);
} catch (Exception e) {
logger.warn("Failed to parse response. This is a bug.", e);
return;
} Maybe you also need to call WDYT? |
I fixed those parser bugs in #17864 and added test coverage and logging.
I don't think this is relevant after all. The parser already returned |
Improves error handling in sender and receiver threads so that the threads do not occasionally stop when an unexpected exception occurs.
Closes #17828