Skip to content

Commit

Permalink
show actual result as well as expectation
Browse files Browse the repository at this point in the history
  • Loading branch information
liamkinne committed Jun 30, 2024
1 parent 174d560 commit bd4c5f3
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 bd4c5f3

Please sign in to comment.