Skip to content
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

Modbus: AbstractReadTask: Enhance Parsing Response; exception catch #2879

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Enhance Parsing Response debug output
More generic catch block for more detailed channel assignment errors. E.g. the original code is not able to catch the following kind of errors:
[modbus1 ] ERROR [dbus.api.task.AbstractReadTask] Parsing Response failed. IllegalArgumentException: Unable to set value [-4395165653183430656] for Channel [battery0/ChrW]: Cannot convert. Long [-4395165653183430656] is not fitting in Integer range.

This kind of messages would have been very helpful for detecting channel mapping errors, but it is not catched by OpenemsException
clehne authored and DerStoecki committed Nov 20, 2024
commit 47542c5cad9688d0dd2d8d75a4f74c2c981a53c2
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ public ExecuteState execute(AbstractModbusBridge bridge) {

return ExecuteState.OK;

} catch (OpenemsException e1) {
} catch (Exception e1) {
logError(this.log, e1, "Parsing Response failed.");
throw e1;
}