Functions
Error Functions

Functions that set and retrieve error codes in Embryo programs. More...

Functions

EAPI void embryo_program_error_set (Embryo_Program *ep, Embryo_Error error)
 Sets the error code for the given program to the given code. More...
 
EAPI Embryo_Error embryo_program_error_get (Embryo_Program *ep)
 Retrieves the current error code for the given program. More...
 
EAPI const char * embryo_error_string_get (Embryo_Error error)
 Retrieves a string describing the given error code. More...
 

Detailed Description

Functions that set and retrieve error codes in Embryo programs.

Function Documentation

◆ embryo_program_error_set()

EAPI void embryo_program_error_set ( Embryo_Program *  ep,
Embryo_Error  error 
)

Sets the error code for the given program to the given code.

Parameters
epThe given program.
errorThe given error code.

◆ embryo_program_error_get()

EAPI Embryo_Error embryo_program_error_get ( Embryo_Program *  ep)

Retrieves the current error code for the given program.

Parameters
epThe given program.
Returns
The current error code.

◆ embryo_error_string_get()

EAPI const char* embryo_error_string_get ( Embryo_Error  error)

Retrieves a string describing the given error code.

Parameters
errorThe given error code.
Returns
String describing the given error code. If the given code is not known, the string "(unknown)" is returned.