Name Date Size #Lines LOC

..--

BUILDH A D25-Apr-20251.2 KiB4238

CMakeLists.txtH A D25-Apr-20252.3 KiB7162

README.mdH A D25-Apr-2025710 3423

greeter_client.ccH A D25-Apr-20253.4 KiB10868

greeter_server.ccH A D25-Apr-20253.3 KiB9863

README.md

1# Error Handling Example
2
3## Overview
4
5This example shows you how to return error from the server and
6how to handle it on the client.
7
8### Try it!
9
10Once you have working gRPC, you can build this example using either bazel or cmake.
11
12Run the server, which will listen on port 50051:
13
14```sh
15$ ./greeter_server
16```
17
18Run the client (in a different terminal):
19
20```sh
21$ ./greeter_client
22```
23
24If things go smoothly, you will see the client output:
25
26```
27### Send: SayHello(name=)
28Failed. Code=3 Message=Length of `Name` should be between 1 and 10
29### Send: SayHello(name=ItsTooLongName)
30Failed. Code=3 Message=Length of `Name` should be between 1 and 10
31### Send: SayHello(name=World)
32Ok. ReplyMessage=Hello World
33```
34