A representation of an operation's outcome. More...
#include <status.h>
Public Member Functions | |
Status () | |
Create an object representing success status. | |
Status (const Status &s) | |
void | operator= (const Status &s) |
bool | ok () const |
bool | IsNotFound () const |
bool | IsCorruption () const |
bool | IsNotSupported () const |
bool | IsIOError () const |
bool | IsInvalidArgument () const |
bool | IsAlreadyPresent () const |
bool | IsRuntimeError () const |
bool | IsNetworkError () const |
bool | IsIllegalState () const |
bool | IsNotAuthorized () const |
bool | IsAborted () const |
bool | IsRemoteError () const |
bool | IsServiceUnavailable () const |
bool | IsTimedOut () const |
bool | IsUninitialized () const |
bool | IsConfigurationError () const |
bool | IsIncomplete () const |
bool | IsEndOfFile () const |
std::string | ToString () const |
std::string | CodeAsString () const |
Slice | message () const |
int16_t | posix_code () const |
Status | CloneAndPrepend (const Slice &msg) const |
Status | CloneAndAppend (const Slice &msg) const |
size_t | memory_footprint_excluding_this () const |
size_t | memory_footprint_including_this () const |
Static Public Member Functions | |
static Status | OK () |
Methods to build status objects for various types of errors. | |
static Status | NotFound (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | Corruption (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | NotSupported (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | InvalidArgument (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | IOError (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | AlreadyPresent (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | RuntimeError (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | NetworkError (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | IllegalState (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | NotAuthorized (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | Aborted (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | RemoteError (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | ServiceUnavailable (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | TimedOut (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | Uninitialized (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | ConfigurationError (const Slice &msg, const Slice &msg2=Slice(), int16_t posix_code=-1) |
static Status | Incomplete (const Slice &msg, const Slice &msg2=Slice(), int64_t posix_code=-1) |
static Status | EndOfFile (const Slice &msg, const Slice &msg2=Slice(), int64_t posix_code=-1) |
A representation of an operation's outcome.
kudu::Status::Status | ( | const Status & | s | ) | [inline] |
Copy the specified status.
[in] | s | The status object to copy from. |
Clone the object and add the specified suffix to the clone's message.
[in] | msg | The message to append. |
Clone the object and add the specified prefix to the clone's message.
[in] | msg | The message to prepend. |
std::string kudu::Status::CodeAsString | ( | ) | const |
bool kudu::Status::IsAborted | ( | ) | const [inline] |
true
iff the status indicates an Aborted error. bool kudu::Status::IsAlreadyPresent | ( | ) | const [inline] |
true
iff the status indicates an AlreadyPresent error. bool kudu::Status::IsConfigurationError | ( | ) | const [inline] |
true
iff the status indicates ConfigurationError. bool kudu::Status::IsCorruption | ( | ) | const [inline] |
true
iff the status indicates a Corruption error. bool kudu::Status::IsEndOfFile | ( | ) | const [inline] |
true
iff the status indicates end of file. bool kudu::Status::IsIllegalState | ( | ) | const [inline] |
true
iff the status indicates an IllegalState error. bool kudu::Status::IsIncomplete | ( | ) | const [inline] |
true
iff the status indicates Incomplete. bool kudu::Status::IsInvalidArgument | ( | ) | const [inline] |
true
iff the status indicates an InvalidArgument error. bool kudu::Status::IsIOError | ( | ) | const [inline] |
true
iff the status indicates an IOError. bool kudu::Status::IsNetworkError | ( | ) | const [inline] |
true
iff the status indicates a NetworkError. bool kudu::Status::IsNotAuthorized | ( | ) | const [inline] |
true
iff the status indicates a NotAuthorized error. bool kudu::Status::IsNotFound | ( | ) | const [inline] |
true
iff the status indicates a NotFound error. bool kudu::Status::IsNotSupported | ( | ) | const [inline] |
true
iff the status indicates a NotSupported error. bool kudu::Status::IsRemoteError | ( | ) | const [inline] |
true
iff the status indicates a RemoteError. bool kudu::Status::IsRuntimeError | ( | ) | const [inline] |
true
iff the status indicates a RuntimeError. bool kudu::Status::IsServiceUnavailable | ( | ) | const [inline] |
true
iff the status indicates ServiceUnavailable. bool kudu::Status::IsTimedOut | ( | ) | const [inline] |
true
iff the status indicates TimedOut. bool kudu::Status::IsUninitialized | ( | ) | const [inline] |
true
iff the status indicates Uninitialized. size_t kudu::Status::memory_footprint_excluding_this | ( | ) | const |
size_t kudu::Status::memory_footprint_including_this | ( | ) | const |
Slice kudu::Status::message | ( | ) | const |
bool kudu::Status::ok | ( | ) | const [inline] |
true
iff the status indicates success. static Status kudu::Status::OK | ( | ) | [inline, static] |
void kudu::Status::operator= | ( | const Status & | s | ) | [inline] |
Assign the specified status.
[in] | s | The status object to assign from. |
int16_t kudu::Status::posix_code | ( | ) | const |
-1
if there is none. std::string kudu::Status::ToString | ( | ) | const |