mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Added an API in rocksdb for checking for "invalid argument" and "not supported" for leveldb::Status
Summary: a function added to status.h to check whether Status::code is InvalidArgument and similarly for NotSupported state Test Plan: visual inspection Reviewers: heyongqiang, dhruba Reviewed By: dhruba CC: leveldb Differential Revision: https://reviews.facebook.net/D7989
This commit is contained in:
@@ -57,6 +57,12 @@ class Status {
|
||||
// Returns true iff the status indicates a Corruption error.
|
||||
bool IsCorruption() const { return code() == kCorruption; }
|
||||
|
||||
// Returns true iff the status indicates a NotSupported error.
|
||||
bool IsNotSupported() const { return code() == kNotSupported; }
|
||||
|
||||
// Returns true iff the status indicates an InvalidArgument error.
|
||||
bool IsInvalidArgument() const { return code() == kInvalidArgument; }
|
||||
|
||||
// Returns true iff the status indicates an IOError.
|
||||
bool IsIOError() const { return code() == kIOError; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user