Files
ss/include/rvl/OS/OSError.h
T
Elijah Thomas 8a3710824b Updated CC collision (#80)
* c_cc_d soooo close

* d_cc_shape_colliders -> d_cc_d

* ported over changes from #43

* Oops, didnt save

* use better collision functions in bombf

* bombf fixes

* bombf actorPostCreate matching

* fix

* small fix for cCcD_UnkAttr Set function

* more cleanup(?) for c_cc_d

* d_cc_mass_s OK

* Initial d_cc_s setup

* some easy funcs

---------

Co-authored-by: robojumper <robojumper@gmail.com>
2024-11-01 17:07:16 -04:00

58 lines
1.4 KiB
C

#ifndef RVL_SDK_OS_ERROR_H
#define RVL_SDK_OS_ERROR_H
#include "__va_arg.h"
#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
// Forward declarations
typedef struct OSContext OSContext;
#define OSError(...) OSPanic(__FILE__, __LINE__, __VA_ARGS__)
#define OSAssert(exp, ...) \
if (!(exp)) \
OSPanic(__FILE__, __LINE__, __VA_ARGS__)
typedef enum {
OS_ERR_SYSTEM_RESET,
OS_ERR_MACHINE_CHECK,
OS_ERR_DSI,
OS_ERR_ISI,
OS_ERR_EXT_INTERRUPT,
OS_ERR_ALIGNMENT,
OS_ERR_PROGRAM,
OS_ERR_FP_UNAVAIL,
OS_ERR_DECREMENTER,
OS_ERR_SYSTEM_CALL,
OS_ERR_TRACE,
OS_ERR_PERF_MONITOR,
OS_ERR_IABR,
OS_ERR_SMI,
OS_ERR_THERMAL_INT,
OS_ERR_PROTECTION,
OS_ERR_FP_EXCEPTION,
OS_ERR_MAX
} OSErrorType;
typedef void (*OSErrorHandler)(u16 error, OSContext *ctx, u32 dsisr, u32 dar);
extern OSErrorHandler __OSErrorTable[OS_ERR_MAX];
extern u32 __OSFpscrEnableBits;
void OSReport(const char *msg, ...);
void OSVReport(const char *msg, va_list args);
void OSPanic(const char *file, int line, const char *msg, ...);
OSErrorHandler OSSetErrorHandler(u16 error, OSErrorHandler handler);
void __OSUnhandledException(u8 error, OSContext *ctx, u32 dsisr, u32 dar);
#ifdef __cplusplus
}
#endif
#endif