Hello,

I'm trying to find a way to add custom method handlers on my service, but 
cannot see a way with the current API. 

As far as I can tell, generated Service classes call 
`grpc::Service::AddMethod()` with an `::grpc::internal::RpcMethodHandler` 
whose handler function is a closure that just contains `return 
service->RpcMethod(ctx, req, resp);`. In turn, 
`RpcMethodHandler::RunHandler()` uses the `CatchingFunctionHandler` to run 
the handler function within a try-catch and return StatusCode::UNKNOWN if 
it throws.

Instead, I'd like to have a slight variant on the CatchingFunctionHandler 
that does a bit more with exceptions (log the , etc.) However, it doesn't 
look like the API allows for customization in this area: `AddMethod()` is 
not virtual, so I cannot override it in my service subclass, and once a 
method been added, it is private to grpc::Service, and I cannot access it 
to modify or customize its handler any more.

Is there a way this can be done? Or if not, any plans to make it possible?

Davor

-- 
*
*
*
*
*Confidentiality Notice: This communication contains information 
which is confidential and may also be legally privileged.  If you are not 
the intended recipient(s), you are hereby notified that any disclosure, 
copying, distribution, or use of this communication is strictly prohibited. 
 If you have received this communication in error, please notify the sender 
and promptly delete from your system the entirety of the communication and 
any copies thereof.  *

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/766bd8c0-36b2-4898-8f1c-3dffafb18c4fn%40googlegroups.com.

Reply via email to