grpc/examples/ruby/errors_and_cancellation
Alexander Polcyn f5521c33f9 Revert "Merge branch 'master' into v1.3.x"
This reverts commit 79759fea1a, reversing
changes made to dc36f4df6a.
2017-04-26 14:18:39 -07:00
..
README.md Revert "Merge branch 'master' into v1.3.x" 2017-04-26 14:18:39 -07:00
error_examples_client.rb add examples for ruby error throwing and handling 2017-03-28 13:49:58 -07:00
error_examples_server.rb add examples for ruby error throwing and handling 2017-03-28 13:49:58 -07:00

README.md

#Errors and Cancelletion code samples for grpc-ruby

The examples in this directory show use of grpc errors.

On the server side, errors are returned from service implementations by raising a certain GRPC::BadStatus exception.

On the client side, GRPC errors get raised when either:

  • the call completes (unary and client-streaming call types)
  • the response Enumerable is iterated through (server-streaming and bidi call types).

To run the examples here:

Start the server:

> ruby error_examples_server.rb

Then run the client:

> ruby error_examples_client.rb