Programming Support

Error return and reporting

class Status

Status outcome object (success or error)

The Status object is an object holding the outcome of an operation. The outcome is represented as a StatusCode, either success (StatusCode::OK) or an error (any other of the StatusCode enumeration values).

Additionally, if an error occurred, a specific error message is generally attached.

Public Functions

bool ok() const

Return true iff the status indicates success.

bool IsOutOfMemory() const

Return true iff the status indicates an out-of-memory error.

bool IsKeyError() const

Return true iff the status indicates a key lookup error.

bool IsInvalid() const

Return true iff the status indicates invalid data.

bool IsIOError() const

Return true iff the status indicates an IO-related failure.

bool IsCapacityError() const

Return true iff the status indicates a container reaching capacity limits.

bool IsTypeError() const

Return true iff the status indicates a type error.

bool IsUnknownError() const

Return true iff the status indicates an unknown error.

bool IsNotImplemented() const

Return true iff the status indicates an unimplemented operation.

bool IsSerializationError() const

Return true iff the status indicates a (de)serialization failure.

bool IsRError() const

Return true iff the status indicates a R-originated error.

bool IsPythonError() const

Return true iff the status indicates a Python-originated error.

bool IsPlasmaObjectExists() const

Return true iff the status indicates an already existing Plasma object.

bool IsPlasmaObjectNonexistent() const

Return true iff the status indicates a non-existent Plasma object.

bool IsPlasmaObjectAlreadySealed() const

Return true iff the status indicates an already sealed Plasma object.

bool IsPlasmaStoreFull() const

Return true iff the status indicates the Plasma store reached its capacity limit.

std::string ToString() const

Return a string representation of this status suitable for printing.

The string “OK” is returned for success.

std::string CodeAsString() const

Return a string representation of the status code, without the message text or POSIX code information.

StatusCode code() const

Return the StatusCode value attached to this status.

std::string message() const

Return the specific error message attached to this status.

Public Static Functions

static Status OK()

Return a success status.

template <typename... Args>
static Status OK(Args&&... args)

Return a success status with a specific message.

template <typename... Args>
static Status OutOfMemory(Args&&... args)

Return an error status for out-of-memory conditions.

template <typename... Args>
static Status KeyError(Args&&... args)

Return an error status for failed key lookups (e.g. column name in a table)

template <typename... Args>
static Status TypeError(Args&&... args)

Return an error status for type errors (such as mismatching data types)

template <typename... Args>
static Status UnknownError(Args&&... args)

Return an error status for unknown errors.

template <typename... Args>
static Status NotImplemented(Args&&... args)

Return an error status when an operation or a combination of operation and data types is unimplemented.

template <typename... Args>
static Status Invalid(Args&&... args)

Return an error status for invalid data (for example a string that fails parsing)

template <typename... Args>
static Status CapacityError(Args&&... args)

Return an error status when a container’s capacity would exceed its limits.

template <typename... Args>
static Status IOError(Args&&... args)

Return an error status when some IO-related operation failed.

template <typename... Args>
static Status SerializationError(Args&&... args)

Return an error status when some (de)serialization operation failed.

ARROW_RETURN_NOT_OK(status)

Propagate any non-successful Status to the caller.