aboutsummaryrefslogtreecommitdiff
path: root/include/leveldb/status.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/leveldb/status.h')
-rw-r--r--include/leveldb/status.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/leveldb/status.h b/include/leveldb/status.h
index 3355fac..11dbd4b 100644
--- a/include/leveldb/status.h
+++ b/include/leveldb/status.h
@@ -54,6 +54,12 @@ class Status {
// Returns true iff the status indicates a NotFound error.
bool IsNotFound() const { return code() == kNotFound; }
+ // Returns true iff the status indicates a Corruption error.
+ bool IsCorruption() const { return code() == kCorruption; }
+
+ // Returns true iff the status indicates an IOError.
+ bool IsIOError() const { return code() == kIOError; }
+
// Return a string representation of this status suitable for printing.
// Returns the string "OK" for success.
std::string ToString() const;