Files
ballistic/include/bal_errors.h
Ronald Caesar 6f37f21e4b engine: add imcorrect register type header
Introduces BAL_ERROR_INCORRECT_REGISTER_TYPE for incorrectly decoded
registers.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2026-03-04 07:10:13 +00:00

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 ***/