Home | History | Annotate | only in /external/grpc-grpc/examples/ruby/errors_and_cancellation
Up to higher level directory
NameDateSize
error_examples_client.rb22-Oct-20202.6K
error_examples_server.rb22-Oct-20201.9K
README.md22-Oct-2020594

README.md

      1 # Errors and Cancelletion code samples for grpc-ruby
      2 
      3 The examples in this directory show use of grpc errors.
      4 
      5 On the server side, errors are returned from service
      6 implementations by raising a certain `GRPC::BadStatus` exception.
      7 
      8 On the client side, GRPC errors get raised when either:
      9  * the call completes (unary and client-streaming call types)
     10  * the response `Enumerable` is iterated through (server-streaming and
     11    bidi call types).
     12 
     13 ## To run the examples here:
     14 
     15 Start the server:
     16 
     17 ```
     18 > ruby error_examples_server.rb
     19 ```
     20 
     21 Then run the client:
     22 
     23 ```
     24 > ruby error_examples_client.rb
     25 ```
     26