diff options
author | azevaykin <azevaykin@yandex-team.com> | 2023-07-30 09:02:42 +0300 |
---|---|---|
committer | azevaykin <azevaykin@yandex-team.com> | 2023-07-30 09:02:42 +0300 |
commit | a40db7ee2dc734e6ec96fe2a28405e6ff0453c84 (patch) | |
tree | d520982a88c0b91360de005bcd4a954cb5201b95 /library | |
parent | ccadbc42de5fafe11134d6b6c3e926c1de1ab819 (diff) | |
download | ydb-a40db7ee2dc734e6ec96fe2a28405e6ff0453c84.tar.gz |
ToDebugString
Diffstat (limited to 'library')
-rw-r--r-- | library/cpp/grpc/client/grpc_client_low.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/library/cpp/grpc/client/grpc_client_low.h b/library/cpp/grpc/client/grpc_client_low.h index 037463cb78..d9a061035d 100644 --- a/library/cpp/grpc/client/grpc_client_low.h +++ b/library/cpp/grpc/client/grpc_client_low.h @@ -5,6 +5,7 @@ #include <library/cpp/deprecated/atomic/atomic.h> #include <util/thread/factory.h> +#include <util/string/builder.h> #include <grpc++/grpc++.h> #include <grpc++/support/async_stream.h> #include <grpc++/support/async_unary_call.h> @@ -169,6 +170,14 @@ struct TGrpcStatus { bool Ok() const { return !InternalError && GRpcStatusCode == grpc::StatusCode::OK; } + + TStringBuilder ToDebugString() const { + TStringBuilder ret; + ret << "gRpcStatusCode: " << GRpcStatusCode; + if(!Ok()) + ret << ", Msg: " << Msg << ", Details: " << Details << ", InternalError: " << InternalError; + return ret; + } }; bool inline IsGRpcStatusGood(const TGrpcStatus& status) { |