Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement __str__ for all OCPP exceptions #105

Closed
OrangeTux opened this issue Aug 23, 2020 · 0 comments · Fixed by #106
Closed

Implement __str__ for all OCPP exceptions #105

OrangeTux opened this issue Aug 23, 2020 · 0 comments · Fixed by #106
Assignees
Labels
enhancement New feature or request

Comments

@OrangeTux
Copy link
Contributor

Currently errors in ocpp.exceptions lack a __str__() implementation. Therefore the following code doesn't print the error:

try:
   // Something that raises an exception.
except ocpp.exceptions.OCPPError as e:
  logger.warning("Failed to do something: %s", e)
@OrangeTux OrangeTux added the enhancement New feature or request label Aug 23, 2020
@OrangeTux OrangeTux changed the title Implement __str__ for all OCPP exception. Implement __str__ for all OCPP exceptions Aug 23, 2020
@laysauchoa laysauchoa self-assigned this Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

2 participants