1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hmz007 6d24f2138b
Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56)
3 years ago
..
README.md Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
error_examples_client.rb Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
error_examples_server.rb Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago

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