diff options
author | Yang Gao <yangg@google.com> | 2017-06-07 15:31:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-07 15:31:09 -0700 |
commit | 2f6715d49b04163a9006c4c93b5ef8a1a1e4e98c (patch) | |
tree | c307e4060b88281053aa887d53cc3129daf90869 /include | |
parent | 3f02e8cb4ba8882ee710b6af766bc7c6b74594e4 (diff) | |
parent | 63610c4740fb5e4e773beb32b658605933741272 (diff) |
Merge pull request #11399 from yang-g/status_ok_message
Update comments to discourage having an OK status with error_message
Diffstat (limited to 'include')
-rw-r--r-- | include/grpc++/impl/codegen/status.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/grpc++/impl/codegen/status.h b/include/grpc++/impl/codegen/status.h index 31fd6cdbe7..994d631181 100644 --- a/include/grpc++/impl/codegen/status.h +++ b/include/grpc++/impl/codegen/status.h @@ -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), |