|
|
|
@ -75,11 +75,16 @@ _COMPRESSION_METADATA_STRING_MAPPING = { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class BaseError(Exception): |
|
|
|
|
"""The base class for all exceptions generated by gRPC framework.""" |
|
|
|
|
"""The base class for exceptions generated by gRPC AsyncIO stack.""" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class UsageError(BaseError): |
|
|
|
|
"""Raised when the usage might lead to undefined behavior.""" |
|
|
|
|
"""Raised when the usage of API by applications is inappropriate. |
|
|
|
|
|
|
|
|
|
For example, trying to invoke RPC on a closed channel, mixing two styles |
|
|
|
|
of streaming API on the client side. This exception should not be |
|
|
|
|
suppressed. |
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class AbortError(BaseError): |
|
|
|
@ -91,4 +96,4 @@ class AbortError(BaseError): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class InternalError(BaseError): |
|
|
|
|
"""Raised when unexpected error returned by Core.""" |
|
|
|
|
"""Raised upon unexpected errors in native code.""" |
|
|
|
|