Exceptions
This section explains the different exceptions used in the project.
NegativeResponseException
- class udsoncan.exceptions.NegativeResponseException(response, *args, **kwargs)[source]
Raised when the server returns a negative response (response code starting by 0x7F). The response that triggered the exception is available in
e.response
- Parameters:
response (Response) – The response that triggered the exception
InvalidResponseException
- class udsoncan.exceptions.InvalidResponseException(response, *args, **kwargs)[source]
Raised when a service fails to decode a server response data. A bad message length or a value that is out of range may both be valid causes. The response that triggered the exception is available in
e.response
- Parameters:
response (Response) – The response that triggered the exception
UnexpectedResponseException
- class udsoncan.exceptions.UnexpectedResponseException(response, details='<No details given>', *args, **kwargs)[source]
Raised when the client receives a valid response but considers the one received to not be the expected response. The response that triggered the exception is available in
e.response
- Parameters:
response (Response) – The response that triggered the exception
details (string) – Additional details about the error