diff --git a/python/uds.py b/python/uds.py index 10f66dc17216b7..5f5ae53bfbac01 100644 --- a/python/uds.py +++ b/python/uds.py @@ -213,10 +213,13 @@ class MessageTimeoutError(Exception): class NegativeResponseError(Exception): def __init__(self, message, service_id, error_code): - super(Exception, self).__init__(message) + self.message = message self.service_id = service_id self.error_code = error_code + def __str__(self): + return self.message + class InvalidServiceIdError(Exception): pass