54 char failure_mesg[0x60];
Result ERRF_ThrowResult(Result failure)
Throws (and logs) a system error with the given Result code.
Result ERRF_SetUserString(const char *user_string)
Specify an additional user string to use for error reporting.
void ERRF_ExceptionHandler(ERRF_ExceptionInfo *excep, CpuRegisters *regs) __attribute__((noreturn))
Handles an exception using ErrDisp.
ERRF_ErrType
Types of errors that can be thrown by err:f.
Definition: errf.h:11
@ ERRF_ERRTYPE_LOG_ONLY
Log-level failure. Does not display the exception and does not force the system to reboot.
Definition: errf.h:17
@ ERRF_ERRTYPE_CARD_REMOVED
Game content storage medium (cartridge and/or SD card) ejected. Not logged.
Definition: errf.h:14
@ ERRF_ERRTYPE_EXCEPTION
CPU or VFP exception.
Definition: errf.h:15
@ ERRF_ERRTYPE_GENERIC
Generic fatal error. Shows miscellaneous info, including the address of the caller.
Definition: errf.h:12
@ ERRF_ERRTYPE_NAND_DAMAGED
Damaged NAND (CC_ERROR after reading CSR)
Definition: errf.h:13
@ ERRF_ERRTYPE_FAILURE
Fatal error with a message instead of the caller's address.
Definition: errf.h:16
void errfExit(void)
Exits ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this.
Result ERRF_ThrowResultWithMessage(Result failure, const char *message)
Throws a system error with the given Result code and message.
Result ERRF_LogResult(Result failure)
Logs a system error with the given Result code.
Handle * errfGetSessionHandle(void)
Gets the current err:f API session handle.
ERRF_ExceptionType
Types of 'Exceptions' thrown for ERRF_ERRTYPE_EXCEPTION.
Definition: errf.h:21
@ ERRF_EXCEPTION_UNDEFINED
Undefined instruction.
Definition: errf.h:24
@ ERRF_EXCEPTION_PREFETCH_ABORT
Prefetch Abort.
Definition: errf.h:22
@ ERRF_EXCEPTION_DATA_ABORT
Data abort.
Definition: errf.h:23
@ ERRF_EXCEPTION_VFP
VFP (floating point) exception.
Definition: errf.h:25
Result ERRF_Throw(const ERRF_FatalErrInfo *error)
Throws a system error and possibly logs it.
Result errfInit(void)
Initializes ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this.
__attribute__((warn_unused_result)) rbtree_node_t *rbtree_insert(rbtree_t *tree
Inserts a node into an rbtree.
Structure representing CPU registers.
Definition: types.h:63
CpuRegisters regs
CPU register dump.
Definition: errf.h:40
ERRF_ExceptionInfo excep
Exception info struct.
Definition: errf.h:39
ERRF_ExceptionType type
Type of the exception. One of the ERRF_EXCEPTION_* values.
Definition: errf.h:29
u32 fsr
ifsr (prefetch abort) / dfsr (data abort)
Definition: errf.h:31
u32 far
pc = ifar (prefetch abort) / dfar (data abort)
Definition: errf.h:32
u32 resCode
Result code.
Definition: errf.h:47
u8 revHigh
High revison ID.
Definition: errf.h:45
u64 appTitleId
Title ID of the running application.
Definition: errf.h:51
u16 revLow
Low revision ID.
Definition: errf.h:46
ERRF_ErrType type
Type, one of the ERRF_ERRTYPE_* enum.
Definition: errf.h:44
u32 pcAddr
PC address at exception.
Definition: errf.h:48
u32 procId
Process ID of the caller.
Definition: errf.h:49
ERRF_ExceptionData exception_data
Data for when type is ERRF_ERRTYPE_EXCEPTION.
Definition: errf.h:53
u64 titleId
Title ID of the caller.
Definition: errf.h:50
uint64_t u64
64-bit unsigned integer
Definition: types.h:24
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21
u32 Handle
Resource handle.
Definition: types.h:41
s32 Result
Function result.
Definition: types.h:42
uint16_t u16
16-bit unsigned integer
Definition: types.h:22
uint32_t u32
32-bit unsigned integer
Definition: types.h:23