§tiro::api_error

Represents an error thrown by the tiro c library.

#include "tiropp/error.hpp"

Inherits from error, exception

§Public Functions

Name
api_error(tiro_error_t raw_error)
Constructs a new error from the given raw error.
api_errccode() const
Returns the error code represented by this error.
tiro_error_traw_error() const
Returns the wrapped tiro_error_t instance.
const char *name() const
Returns the name of the error (never null).
virtual const char *message() const override
Returns the human readable error message (never null).
virtual const char *details() const override
Returns detailed error information (may be the empty string, but never null).
const char *what() const override

§Public Functions Documentation

§function api_error

inline explicit api_error(
tiro_error_t raw_error
)

Constructs a new error from the given raw error.

The error takes ownership of the raw error.

§function code

inline api_errc code() const

Returns the error code represented by this error.

§function raw_error

inline tiro_error_t raw_error() const

Returns the wrapped tiro_error_t instance.

§function name

inline const char * name() const

Returns the name of the error (never null).

§function message

inline virtual const char * message() const override

Returns the human readable error message (never null).

Reimplements: tiro::error::message

§function details

inline virtual const char * details() const override

Returns detailed error information (may be the empty string, but never null).

Reimplements: tiro::error::details

§function what

inline const char * what() const override

Updated on 2022-02-27 at 21:17:13 +0100