[digiplex] Fix exception handling in sender and receiver threads#17829
[digiplex] Fix exception handling in sender and receiver threads#17829rmichalak wants to merge 1 commit intoopenhab:mainfrom
Conversation
416f9d4 to
b9cbdec
Compare
Signed-off-by: Robert Michalak <rbrt.michalak@gmail.com>
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 when If you cannot fix that now, perhaps you could catch it closer to where it is expected to happen: 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 |
|
Superceded by #18035. |
Improves error handling in sender and receiver threads so that the threads do not occasionally stop when an unexpected exception occurs.
Closes #17828