Open root-kidik opened 4 months ago
pg_grpc_service_template
// Initiate the RPC. No actual actions have been taken thus far besides // preparing to send the request. auto stream = client_.SayHello(request, std::move(context));
Now:
try { auto response = client_.SayHello(request, std::move(context)).Finish(); } catch (const ugrpc::client::RpcError&) { // ... }
After:
if (auto result = client_.SayHello(request, std::move(context)).FinishWithError(); result.has_value()) // ... result.value() else // ... result.error()
pg_grpc_service_template
Now:
After: