class Status
Defined at line 34 of file ../../third_party/grpc-migrating/src/include/grpcpp/impl/status.h
Did it work? If it didn't, why?
See
for details on the available code and their meaning.
Public Members
static const Status & OK
static const Status & CANCELLED
Public Methods
void Status ()
Construct an OK instance.
Defined at line 37 of file ../../third_party/grpc-migrating/src/include/grpcpp/impl/status.h
void Status (StatusCode code, const std::string & error_message)
Construct an instance with associated
and
It is an error to construct an OK status with non-empty
Note that
is intentionally accepted as a const reference
instead of a value (which results in a copy instead of a move) to allow
for easy transition to absl::Status in the future which accepts an
absl::string_view as a parameter.
Defined at line 98 of file ../../third_party/grpc-migrating/src/include/grpcpp/impl/status.h
void Status (StatusCode code, const std::string & error_message, const std::string & error_details)
Construct an instance with
and
It is an error to construct an OK status with non-empty
and/or
Defined at line 104 of file ../../third_party/grpc-migrating/src/include/grpcpp/impl/status.h
StatusCode error_code ()
Return the instance's error code.
Defined at line 117 of file ../../third_party/grpc-migrating/src/include/grpcpp/impl/status.h
std::string error_message ()
Return the instance's error message.
Defined at line 119 of file ../../third_party/grpc-migrating/src/include/grpcpp/impl/status.h
std::string error_details ()
Return the (binary) error details.
Usually it contains a serialized google.rpc.Status proto.
Defined at line 122 of file ../../third_party/grpc-migrating/src/include/grpcpp/impl/status.h
bool ok ()
Is the status OK?
Defined at line 125 of file ../../third_party/grpc-migrating/src/include/grpcpp/impl/status.h
void IgnoreError ()
Ignores any errors. This method does nothing except potentially suppress
complaints from any tools that are checking that errors are not dropped on
the floor.
Defined at line 130 of file ../../third_party/grpc-migrating/src/include/grpcpp/impl/status.h