Skip to content
Snippets Groups Projects
Commit 2f6715d4 authored by Yang Gao's avatar Yang Gao Committed by GitHub
Browse files

Merge pull request #11399 from yang-g/status_ok_message

Update comments to discourage having an OK status with error_message
parents 3f02e8cb 63610c47
No related branches found
No related tags found
No related merge requests found
......@@ -47,11 +47,14 @@ class Status {
/// Construct an OK instance.
Status() : code_(StatusCode::OK) {}
/// Construct an instance with associated \a code and \a error_message
/// Construct an instance with associated \a code and \a error_message.
/// It is an error to construct an OK status with non-empty \a error_message.
Status(StatusCode code, const grpc::string& error_message)
: code_(code), error_message_(error_message) {}
/// Construct an instance with \a code, \a error_message and \a error_details
/// Construct an instance with \a code, \a error_message and
/// \a error_details. It is an error to construct an OK status with non-empty
/// \a error_message and/or \a error_details.
Status(StatusCode code, const grpc::string& error_message,
const grpc::string& error_details)
: code_(code),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment