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