mirror of https://github.com/grpc/grpc.git
Revert "[AbortError] And and check AbortError while abort" (#36076)
This reverts commitpull/36083/head675dcccd5e
. <!-- If you know who should review your pull request, please assign it to that person, otherwise the pull request would get assigned randomly. If your pull request is for a specific language, please add the appropriate lang label. --> Closes #36076 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36076 from XuanWang-Amos:roll_back_AbortError1db7c39903
PiperOrigin-RevId: 613739975
parent
b15c4304f7
commit
9ba8bb5dd2
18 changed files with 49 additions and 139 deletions
@ -1,57 +0,0 @@ |
||||
# Copyright 2024 The gRPC authors. |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
############################# gRPC Exceptions ################################ |
||||
|
||||
|
||||
class BaseError(Exception): |
||||
""" |
||||
The base class for exceptions generated by gRPC. |
||||
""" |
||||
|
||||
|
||||
class UsageError(BaseError): |
||||
""" |
||||
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): |
||||
""" |
||||
Raised when calling abort in servicer methods. |
||||
This exception should not be suppressed. Applications may catch it to |
||||
perform certain clean-up logic, and then re-raise it. |
||||
""" |
||||
|
||||
|
||||
class InternalError(BaseError): |
||||
""" |
||||
Raised upon unexpected errors in native code. |
||||
""" |
||||
|
||||
|
||||
class RpcError(BaseError): |
||||
"""Raised by the gRPC library to indicate non-OK-status RPC termination.""" |
||||
|
||||
|
||||
__all__ = ( |
||||
"BaseError", |
||||
"UsageError", |
||||
"AbortError", |
||||
"InternalError", |
||||
"RpcError", |
||||
) |
Loading…
Reference in new issue