Skip to content

Commit 5cc2534

Browse files
authored
socketcand: show actual result as well as expectation (#1807)
1 parent 174d560 commit 5cc2534

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

can/interfaces/socketcand/socketcand.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def _expect_msg(self, msg):
323323
if self.__tcp_tune:
324324
self.__socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_QUICKACK, 1)
325325
if not ascii_msg == msg:
326-
raise can.CanError(f"{msg} message expected!")
326+
raise can.CanError(f"Expected '{msg}' got: '{ascii_msg}'")
327327

328328
def send(self, msg, timeout=None):
329329
"""Transmit a message to the CAN bus.

0 commit comments

Comments
 (0)