Replace hardcoded parameters
This commit is contained in:
@@ -37,6 +37,12 @@ enum StatusCode {
|
||||
// instead for those errors).
|
||||
PERMISSION_DENIED = 7,
|
||||
|
||||
// The operation was rejected because the system is not in a state
|
||||
// required for the operation's execution. For example, the directory
|
||||
// to be deleted is non-empty, an rmdir operation is applied to
|
||||
// a non-directory, etc.
|
||||
FAILED_PRECONDITION = 9,
|
||||
|
||||
// Operation is not implemented or not supported/enabled in this service.
|
||||
UNIMPLEMENTED = 12,
|
||||
|
||||
@@ -70,7 +76,8 @@ class Status {
|
||||
const std::string& error_message)
|
||||
: error_space_(e), status_code_(c), error_message_(error_message) {}
|
||||
|
||||
Status(const util::ErrorSpace* e, int error, const std::string& error_message)
|
||||
Status(const util::ErrorSpace* e, int error,
|
||||
const std::string& error_message)
|
||||
: error_space_(e), status_code_(error), error_message_(error_message) {}
|
||||
|
||||
bool ok() const { return status_code_ == error::OK; }
|
||||
|
||||
Reference in New Issue
Block a user