Skip to content

Commit

Permalink
socketcand: show actual result as well as expectation (#1807)
Browse files Browse the repository at this point in the history
  • Loading branch information
liamkinne authored Jul 3, 2024
1 parent 174d560 commit 5cc2534
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion can/interfaces/socketcand/socketcand.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def _expect_msg(self, msg):
if self.__tcp_tune:
self.__socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_QUICKACK, 1)
if not ascii_msg == msg:
raise can.CanError(f"{msg} message expected!")
raise can.CanError(f"Expected '{msg}' got: '{ascii_msg}'")

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

0 comments on commit 5cc2534

Please sign in to comment.