aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/interrupts/isr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/interrupts/isr.c')
-rw-r--r--src/kernel/interrupts/isr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/kernel/interrupts/isr.c b/src/kernel/interrupts/isr.c
index 8da7919..3567acf 100644
--- a/src/kernel/interrupts/isr.c
+++ b/src/kernel/interrupts/isr.c
@@ -1,5 +1,6 @@
#include "../graphics/graphics.h"
#include "interrupts.h"
+#include "../lib/lib.h"
// Defined in isr.asm
extern void isr0();
@@ -147,9 +148,8 @@ const char *exception_messages[] = {
// Master exception handler - halt via endless loop
void fault_handler(struct regs *r) {
if (r->int_no < 32) {
- terminal_write_string("\n");
- terminal_write_string(exception_messages[r->int_no]);
- terminal_write_string(" Exception. System Halted!\n");
- for (;;);
+ char *message = (char *) exception_messages[r->int_no];
+ strcat(message, " Exception");
+ panic(message);
}
}