yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze_errors.h File Reference

Status codes and error helpers for the YAZE public API. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef enum yaze_status yaze_status
 Status codes returned by YAZE functions.
 

Enumerations

enum  yaze_status {
  YAZE_OK = 0 , YAZE_ERROR_UNKNOWN = -1 , YAZE_ERROR_INVALID_ARG = 1 , YAZE_ERROR_FILE_NOT_FOUND = 2 ,
  YAZE_ERROR_MEMORY = 3 , YAZE_ERROR_IO = 4 , YAZE_ERROR_CORRUPTION = 5 , YAZE_ERROR_NOT_INITIALIZED = 6
}
 Status codes returned by YAZE functions. More...
 

Functions

const char * yaze_status_to_string (yaze_status status)
 Convert a status code to a human-readable string.
 

Detailed Description

Status codes and error helpers for the YAZE public API.

Definition in file yaze_errors.h.

Typedef Documentation

◆ yaze_status

typedef enum yaze_status yaze_status

Status codes returned by YAZE functions.

All YAZE functions that can fail return a status code to indicate success or the type of error that occurred.

Enumeration Type Documentation

◆ yaze_status

Status codes returned by YAZE functions.

All YAZE functions that can fail return a status code to indicate success or the type of error that occurred.

Enumerator
YAZE_OK 

Operation completed successfully

YAZE_ERROR_UNKNOWN 

Unknown error occurred

YAZE_ERROR_INVALID_ARG 

Invalid argument provided

YAZE_ERROR_FILE_NOT_FOUND 

File not found

YAZE_ERROR_MEMORY 

Memory allocation failed

YAZE_ERROR_IO 

I/O operation failed

YAZE_ERROR_CORRUPTION 

Data corruption detected

YAZE_ERROR_NOT_INITIALIZED 

Component not initialized

Definition at line 19 of file yaze_errors.h.

Function Documentation

◆ yaze_status_to_string()

const char * yaze_status_to_string ( yaze_status status)

Convert a status code to a human-readable string.

Parameters
statusThe status code to convert
Returns
A null-terminated string describing the status

Definition at line 41 of file yaze.cc.

References YAZE_ERROR_CORRUPTION, YAZE_ERROR_FILE_NOT_FOUND, YAZE_ERROR_INVALID_ARG, YAZE_ERROR_IO, YAZE_ERROR_MEMORY, YAZE_ERROR_NOT_INITIALIZED, YAZE_ERROR_UNKNOWN, and YAZE_OK.