On Sat, Apr 14, 2018 at 5:49 AM, evaliauka via grpc.io < [email protected]> 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 Java." 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 ClientCalls.blockingUnaryCall(). -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CA%2B4M1oMqq3r1f3hjroQkE31zAkVjir%3Dy8d5%2BSCzLVoWdRrTxUg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
smime.p7s
Description: S/MIME Cryptographic Signature
