mirror of
https://github.com/google/leveldb.git
synced 2026-08-22 10:53:27 +08:00
Added leveldb::Status::IsInvalidArgument() method.
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
This commit is contained in:
@@ -63,6 +63,9 @@ class Status {
|
|||||||
// Returns true iff the status indicates a NotSupportedError.
|
// Returns true iff the status indicates a NotSupportedError.
|
||||||
bool IsNotSupportedError() const { return code() == kNotSupported; }
|
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.
|
// Return a string representation of this status suitable for printing.
|
||||||
// Returns the string "OK" for success.
|
// Returns the string "OK" for success.
|
||||||
std::string ToString() const;
|
std::string ToString() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user