Add a useful __str__ method to face exceptions

pull/4044/head
Nathaniel Manista 9 years ago
parent e745ff2c3f
commit 51741d20e3
  1. 4
      src/python/grpcio/grpc/framework/interfaces/face/face.py

@ -117,6 +117,10 @@ class AbortionError(Exception):
self.code = code
self.details = details
def __str__(self):
return '%s(code=%s, details="%s")' % (
self.__class__.__name__, self.code, self.details)
class CancellationError(AbortionError):
"""Indicates that an RPC has been cancelled."""

Loading…
Cancel
Save