libctru
v2.4.1
|
Error Display API. More...
#include <3ds/types.h>
Go to the source code of this file.
Data Structures | |
struct | ERRF_ExceptionInfo |
struct | ERRF_ExceptionData |
struct | ERRF_FatalErrInfo |
Enumerations | |
enum | ERRF_ErrType { ERRF_ERRTYPE_GENERIC = 0 , ERRF_ERRTYPE_NAND_DAMAGED = 1 , ERRF_ERRTYPE_CARD_REMOVED = 2 , ERRF_ERRTYPE_EXCEPTION = 3 , ERRF_ERRTYPE_FAILURE = 4 , ERRF_ERRTYPE_LOG_ONLY = 5 } |
Types of errors that can be thrown by err:f. More... | |
enum | ERRF_ExceptionType { ERRF_EXCEPTION_PREFETCH_ABORT = 0 , ERRF_EXCEPTION_DATA_ABORT = 1 , ERRF_EXCEPTION_UNDEFINED = 2 , ERRF_EXCEPTION_VFP = 3 } |
Types of 'Exceptions' thrown for ERRF_ERRTYPE_EXCEPTION. More... | |
Functions | |
Result | errfInit (void) |
Initializes ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this. | |
void | errfExit (void) |
Exits ERR:f. Unless you plan to call ERRF_Throw yourself, do not use this. | |
Handle * | errfGetSessionHandle (void) |
Gets the current err:f API session handle. More... | |
Result | ERRF_Throw (const ERRF_FatalErrInfo *error) |
Throws a system error and possibly logs it. More... | |
Result | ERRF_ThrowResult (Result failure) |
Throws (and logs) a system error with the given Result code. More... | |
Result | ERRF_LogResult (Result failure) |
Logs a system error with the given Result code. More... | |
Result | ERRF_ThrowResultWithMessage (Result failure, const char *message) |
Throws a system error with the given Result code and message. More... | |
Result | ERRF_SetUserString (const char *user_string) |
Specify an additional user string to use for error reporting. More... | |
void | ERRF_ExceptionHandler (ERRF_ExceptionInfo *excep, CpuRegisters *regs) __attribute__((noreturn)) |
Handles an exception using ErrDisp. More... | |
Error Display API.
enum ERRF_ErrType |
Types of errors that can be thrown by err:f.
enum ERRF_ExceptionType |
void ERRF_ExceptionHandler | ( | ERRF_ExceptionInfo * | excep, |
CpuRegisters * | regs | ||
) |
Handles an exception using ErrDisp.
excep | Exception information |
regs | CPU registers |
You might want to clear ENVINFO's bit0 to be able to see any debugging information.
Logs a system error with the given Result code.
[in] | failure | Result code to log. |
Similar to ERRF_Throw, except that it does not display anything on the screen, nor does it force the system to reboot.
This function does fill in the address where this function was called from.
Result ERRF_SetUserString | ( | const char * | user_string | ) |
Specify an additional user string to use for error reporting.
[in] | user_string | User string (up to 256 bytes, not including NUL byte) |
Result ERRF_Throw | ( | const ERRF_FatalErrInfo * | error | ) |
Throws a system error and possibly logs it.
[in] | error | Error to throw. |
ErrDisp may convert the error info to ERRF_ERRTYPE_NAND_DAMAGED or ERRF_ERRTYPE_CARD_REMOVED depending on the error code.
Except with ERRF_ERRTYPE_LOG_ONLY, the system will panic and will need to be rebooted. Fatal error information will also be logged into a file, unless the type either ERRF_ERRTYPE_NAND_DAMAGED or ERRF_ERRTYPE_CARD_REMOVED.
No error will be shown if the system is asleep.
On retail units with vanilla firmware, no detailed information will be displayed on screen.
You may wish to use ERRF_ThrowResult() or ERRF_ThrowResultWithMessage() instead of constructing the ERRF_FatalErrInfo struct yourself.
Throws (and logs) a system error with the given Result code.
[in] | failure | Result code to throw. |
This calls ERRF_Throw with error type ERRF_ERRTYPE_GENERIC and fills in the required data.
This function does fill in the address where this function was called from.
Throws a system error with the given Result code and message.
[in] | failure | Result code to throw. |
[in] | message | The message to display. |
This calls ERRF_Throw with error type ERRF_ERRTYPE_FAILURE and fills in the required data.
This function does not fill in the address where this function was called from because it would not be displayed.
Handle* errfGetSessionHandle | ( | void | ) |
Gets the current err:f API session handle.