mirror of
https://github.com/pound-emu/ballistic.git
synced 2026-03-09 10:45:39 -07:00
Introduces BAL_ERROR_INCORRECT_REGISTER_TYPE for incorrectly decoded registers. Signed-off-by: Ronald Caesar <github43132@proton.me>
36 lines
810 B
C
36 lines
810 B
C
/** @file bal_errors.h
|
|
*
|
|
* @brief Defines Ballistic error types.
|
|
*/
|
|
|
|
#ifndef BAL_ERRORS_H
|
|
#define BAL_ERRORS_H
|
|
|
|
#include "bal_attributes.h"
|
|
|
|
typedef enum
|
|
{
|
|
// General Errors.
|
|
//
|
|
BAL_SUCCESS = 0,
|
|
BAL_ERROR_INVALID_ARGUMENT = -1,
|
|
BAL_ERROR_ALLOCATION_FAILED = -2,
|
|
BAL_ERROR_MEMORY_ALIGNMENT = -3,
|
|
BAL_ERROR_ENGINE_STATE_INVALID = -4,
|
|
BAL_ERROR_UNKNOWN_INSTRUCTION = -5,
|
|
|
|
// IR Errors.
|
|
//
|
|
BAL_ERROR_INSTRUCTION_OVERFLOW = -100,
|
|
|
|
/// The decoded register type does not match the expected type.
|
|
BAL_ERROR_INCORRECT_REGISTER_TYPE = -101,
|
|
} bal_error_t;
|
|
|
|
/// Converts the enum into a readable string for error handling.
|
|
BAL_COLD const char *bal_error_to_string(bal_error_t error);
|
|
|
|
#endif /* BAL_ERRORS_H */
|
|
|
|
/*** end of file ***/
|