On Sat, Apr 14, 2018 at 5:49 AM, evaliauka via grpc.io <
grpc-io@googlegroups.com> wrote:

> What I want is to setup an exception converter once, and have it applied
> automatically to all grpc calls.

grpc-java doesn't support this, and it would be a bit weird because it
changes the API. Maybe it could be a feature/configuration of the stub, as
long as you only want to throw RuntimeExceptions. But it also seems like it
would bring confusion when used. I do understand the annoyance of dealing
with less-than-ideally-convenient exception types, but it seems "that's

The only real way to do this today is make your own stub type, and that
would imply code generation. You can make a "poor man's" stub by having
your users pass your code a MethodDescriptor (obtained via
YourServiceGrpc.getYourMethod()), at which point you could do any
conversion logic and then call the stub utilities like

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 grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to