Skip to content

Commit

Permalink
proper python3 exception inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
gregjhogan committed Oct 16, 2019
1 parent 6ba0f47 commit 55957d6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/uds.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 55957d6

Please sign in to comment.