Skip to content
Snippets Groups Projects
Commit 51741d20 authored by Nathaniel Manista's avatar Nathaniel Manista
Browse files

Add a useful __str__ method to face exceptions

parent e745ff2c
No related branches found
No related tags found
No related merge requests found
...@@ -117,6 +117,10 @@ class AbortionError(Exception): ...@@ -117,6 +117,10 @@ class AbortionError(Exception):
self.code = code self.code = code
self.details = details self.details = details
def __str__(self):
return '%s(code=%s, details="%s")' % (
self.__class__.__name__, self.code, self.details)
class CancellationError(AbortionError): class CancellationError(AbortionError):
"""Indicates that an RPC has been cancelled.""" """Indicates that an RPC has been cancelled."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment