diff --git a/include/leveldb/status.h b/include/leveldb/status.h index d2bdc22..d9575f9 100644 --- a/include/leveldb/status.h +++ b/include/leveldb/status.h @@ -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;