Skip to content

Commit 05e9a8b

Browse files
fix error messages
1 parent 9071ecc commit 05e9a8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Modbus_TCP_Client_poll.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ void Client_Poll::set_byte_timeout(double timeout) {
222222

223223
if (ret != 0) {
224224
const std::string error_msg = modbus_strerror(errno);
225-
throw std::runtime_error("modbus_receive failed: " + error_msg + ' ' + std::to_string(errno));
225+
throw std::runtime_error("modbus_set_byte_timeout failed: " + error_msg + ' ' + std::to_string(errno));
226226
}
227227
}
228228

@@ -232,7 +232,7 @@ void Client_Poll::set_response_timeout(double timeout) {
232232

233233
if (ret != 0) {
234234
const std::string error_msg = modbus_strerror(errno);
235-
throw std::runtime_error("modbus_receive failed: " + error_msg + ' ' + std::to_string(errno));
235+
throw std::runtime_error("modbus_set_response_timeout failed: " + error_msg + ' ' + std::to_string(errno));
236236
}
237237
}
238238

0 commit comments

Comments
 (0)