Skip to content

Commit

Permalink
Added leveldb::Status::IsInvalidArgument() method.
Browse files Browse the repository at this point in the history
All other Status::Code enum values have an Is**() method with the one
exception of InvalidArgument.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=97166441
  • Loading branch information
cmumford committed Dec 9, 2015
1 parent ce45404 commit 5208e79
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/leveldb/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ class Status {
// Returns true iff the status indicates a NotSupportedError.
bool IsNotSupportedError() const { return code() == kNotSupported; }

// Returns true iff the status indicates an InvalidArgument.
bool IsInvalidArgument() const { return code() == kInvalidArgument; }

// Return a string representation of this status suitable for printing.
// Returns the string "OK" for success.
std::string ToString() const;
Expand Down

0 comments on commit 5208e79

Please sign in to comment.