ResultError struct

Failure attached to a result.

code is 0 when the operation succeeded. A failure uses a non-zero code. name, message, and file are not copied; they must outlive the error. String literals and __FILE__ do.

Public variables

int code
0 on success; a non-zero failure code otherwise.
const char* name
Short stable name, or NULL.
const char* message
Human-readable detail, or NULL.
const char* file
Source file that created the error, or NULL.
int line
Source line that created the error.

Variable documentation

const char* ResultError::name

Short stable name, or NULL.

Not copied.

const char* ResultError::message

Human-readable detail, or NULL.

Not copied.

const char* ResultError::file

Source file that created the error, or NULL.

Not copied.

int ResultError::line

Source line that created the error.

0 if unknown.