summaryrefslogtreecommitdiff
path: root/arm9/src/error_handling.c
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2020-08-31 14:25:08 -0400
committerGitHub <noreply@github.com>2020-08-31 14:25:08 -0400
commitbf25a361cd0d013beb86a936b516957b66cfa011 (patch)
treea43d3b7f6f6c7bf163ec6183a3682ec047163ad5 /arm9/src/error_handling.c
parent0a880566f5889cdeb6fa3f96f5916c39dbb16b38 (diff)
parente20f0ad32ec45564d4ad8c0c3ed07d9c21744588 (diff)
Merge pull request #275 from red031000/master
arm9 MI_init, MI_wram and MI_uncompress + error_handling
Diffstat (limited to 'arm9/src/error_handling.c')
-rw-r--r--arm9/src/error_handling.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arm9/src/error_handling.c b/arm9/src/error_handling.c
new file mode 100644
index 00000000..9052773f
--- /dev/null
+++ b/arm9/src/error_handling.c
@@ -0,0 +1,16 @@
+#include "global.h"
+#include "error_handling.h"
+
+extern u32 FUN_02031810(void);
+extern void PrintErrorMessageAndReset(void);
+
+THUMB_FUNC void ErrorHandling(void)
+{
+ if (FUN_02031810())
+ {
+ if (OS_GetProcMode() != OS_PROCMODE_IRQ)
+ {
+ PrintErrorMessageAndReset();
+ }
+ }
+}