Fray Engine
Loading...
Searching...
No Matches
fray::errors Namespace Reference

Enumerations

enum  code : F_err { FRAY_ERROR_LIST }
 All Engine error codes, generated from FRAY_ERROR_LIST. NONE is 0 and means success. More...

Functions

const F_char * description (code err)
 Formats an error code as "Error <number>: <description>". Not thread-safe: the text lives in a shared static buffer, so copy it before another call or thread can overwrite it.
const F_char * description (F_err err)
 Overload of description() for a plain F_err value.

Enumeration Type Documentation

◆ code

All Engine error codes, generated from FRAY_ERROR_LIST. NONE is 0 and means success.

Enumerator
FRAY_ERROR_LIST 

Definition at line 83 of file errors.hpp.

Function Documentation

◆ description() [1/2]

const F_char * fray::errors::description ( code err)
inline

Formats an error code as "Error <number>: <description>". Not thread-safe: the text lives in a shared static buffer, so copy it before another call or thread can overwrite it.

Parameters
errThe error code to describe.
Returns
Pointer to the static buffer; unknown values give "Error <number>: Unknown error.".

Definition at line 96 of file errors.hpp.

◆ description() [2/2]

const F_char * fray::errors::description ( F_err err)
inline

Overload of description() for a plain F_err value.

Parameters
errError value, cast to code.
Returns
Same static buffer as description(code); see that overload for the thread-safety caveat.

Definition at line 119 of file errors.hpp.