A representation of an operation's outcome.
More...
#include <status.h>
|
static Status | OK () |
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) |
static Status | Immutable (const Slice &msg, const Slice &msg2=Slice(), int64_t posix_code=-1) |
A representation of an operation's outcome.
◆ Status()
kudu::Status::Status |
( |
const Status & | s | ) |
|
|
inline |
Copy the specified status.
- Parameters
-
[in] | s | The status object to copy from. |
◆ Aborted()
Status kudu::Status::Aborted |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int16_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
◆ AlreadyPresent()
Status kudu::Status::AlreadyPresent |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int16_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
◆ CloneAndAppend()
Status kudu::Status::CloneAndAppend |
( |
const Slice & | msg | ) |
const |
Clone this status and add the specified suffix to the message.
If this status is OK, then an OK status will be returned.
- Parameters
-
[in] | msg | The message to append. |
- Returns
- A new Status object with the same state plus an additional trailing message.
◆ CloneAndPrepend()
Status kudu::Status::CloneAndPrepend |
( |
const Slice & | msg | ) |
const |
Clone this status and add the specified prefix to the message.
If this status is OK, then an OK status will be returned.
- Parameters
-
[in] | msg | The message to prepend. |
- Returns
- A new Status object with the same state plus an additional leading message.
◆ CodeAsString()
std::string kudu::Status::CodeAsString |
( |
| ) |
const |
- Returns
- A string representation of the status code, without the message text or POSIX code information.
◆ ConfigurationError()
Status kudu::Status::ConfigurationError |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int16_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
◆ Corruption()
Status kudu::Status::Corruption |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int16_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
◆ EndOfFile()
Status kudu::Status::EndOfFile |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int64_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
◆ IllegalState()
Status kudu::Status::IllegalState |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int16_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
◆ Immutable()
Status kudu::Status::Immutable |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int64_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
◆ Incomplete()
Status kudu::Status::Incomplete |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int64_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
◆ InvalidArgument()
Status kudu::Status::InvalidArgument |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int16_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
◆ IOError()
Status kudu::Status::IOError |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int16_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
◆ IsAborted()
bool kudu::Status::IsAborted |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates an Aborted error.
◆ IsAlreadyPresent()
bool kudu::Status::IsAlreadyPresent |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates an AlreadyPresent error.
◆ IsConfigurationError()
bool kudu::Status::IsConfigurationError |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates ConfigurationError.
◆ IsCorruption()
bool kudu::Status::IsCorruption |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates a Corruption error.
◆ IsDiskFailure()
bool kudu::Status::IsDiskFailure |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates a disk failure.
◆ IsEndOfFile()
bool kudu::Status::IsEndOfFile |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates end of file.
◆ IsIllegalState()
bool kudu::Status::IsIllegalState |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates an IllegalState error.
◆ IsImmutable()
bool kudu::Status::IsImmutable |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates immutable.
◆ IsIncomplete()
bool kudu::Status::IsIncomplete |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates Incomplete.
◆ IsInvalidArgument()
bool kudu::Status::IsInvalidArgument |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates an InvalidArgument error.
◆ IsIOError()
bool kudu::Status::IsIOError |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates an IOError.
◆ IsNetworkError()
bool kudu::Status::IsNetworkError |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates a NetworkError.
◆ IsNotAuthorized()
bool kudu::Status::IsNotAuthorized |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates a NotAuthorized error.
◆ IsNotFound()
bool kudu::Status::IsNotFound |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates a NotFound error.
◆ IsNotSupported()
bool kudu::Status::IsNotSupported |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates a NotSupported error.
◆ IsRemoteError()
bool kudu::Status::IsRemoteError |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates a RemoteError.
◆ IsRuntimeError()
bool kudu::Status::IsRuntimeError |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates a RuntimeError.
◆ IsServiceUnavailable()
bool kudu::Status::IsServiceUnavailable |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates ServiceUnavailable.
◆ IsTimedOut()
bool kudu::Status::IsTimedOut |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates TimedOut.
◆ IsUninitialized()
bool kudu::Status::IsUninitialized |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates Uninitialized.
◆ memory_footprint_excluding_this()
size_t kudu::Status::memory_footprint_excluding_this |
( |
| ) |
const |
- Returns
- The memory usage of this object without the object itself. Should be used when embedded inside another object.
◆ memory_footprint_including_this()
size_t kudu::Status::memory_footprint_including_this |
( |
| ) |
const |
- Returns
- The memory usage of this object including the object itself. Should be used when allocated on the heap.
◆ message()
Slice kudu::Status::message |
( |
| ) |
const |
This is similar to ToString, except that it does not include the stringified error code or POSIX code.
- Note
- The returned Slice is only valid as long as this Status object remains live and unchanged.
- Returns
- The message portion of the Status. For
OK
statuses, this returns an empty string.
◆ NetworkError()
Status kudu::Status::NetworkError |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int16_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
◆ NotAuthorized()
Status kudu::Status::NotAuthorized |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int16_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
◆ NotFound()
Status kudu::Status::NotFound |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int16_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
◆ NotSupported()
Status kudu::Status::NotSupported |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int16_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
◆ OK()
◆ ok()
bool kudu::Status::ok |
( |
| ) |
const |
|
inline |
- Returns
true
iff the status indicates success.
◆ operator=()
Assign the specified status.
- Parameters
-
[in] | s | The status object to assign from. |
- Returns
- The reference to the modified object.
◆ posix_code()
int16_t kudu::Status::posix_code |
( |
| ) |
const |
- Returns
- The POSIX code associated with this Status object, or
-1
if there is none.
◆ RemoteError()
Status kudu::Status::RemoteError |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int16_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
◆ RuntimeError()
Status kudu::Status::RuntimeError |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int16_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
◆ ServiceUnavailable()
Status kudu::Status::ServiceUnavailable |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int16_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
◆ TimedOut()
Status kudu::Status::TimedOut |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int16_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
◆ ToString()
std::string kudu::Status::ToString |
( |
| ) |
const |
- Returns
- A string representation of this status suitable for printing. Returns the string "OK" for success.
◆ Uninitialized()
Status kudu::Status::Uninitialized |
( |
const Slice & | msg, |
|
|
const Slice & | msg2 = Slice(), |
|
|
int16_t | posix_code = -1 ) |
|
inlinestatic |
- Parameters
-
[in] | msg | The informational message on the error. |
[in] | msg2 | Additional information on the error (optional). |
[in] | posix_code | POSIX error code, if applicable (optional). |
- Returns
- The error status of an appropriate type.
The documentation for this class was generated from the following file: