28 if read.requests_closed:
32 self.
_rpc.add_rpc_error(rpc_error)
49 response = implementation(argument, servicer_context)
50 except Exception
as exception:
51 rpc.application_exception_abort(exception)
53 rpc.unary_response_complete(response)
58 response_iterator = implementation(argument, servicer_context)
59 except Exception
as exception:
60 rpc.application_exception_abort(exception)
64 response = copy.deepcopy(
next(response_iterator))
66 rpc.stream_response_complete()
68 except Exception
as exception:
69 rpc.application_exception_abort(exception)
72 rpc.stream_response(response)
75 def unary_unary(implementation, rpc, request, servicer_context):