Add a print_error function, which works for exceptions inside println

This commit is contained in:
Philipp Oppermann
2016-05-28 15:41:16 +02:00
parent c1df1d3354
commit f58a6fe185
3 changed files with 18 additions and 3 deletions

View File

@@ -14,7 +14,9 @@ pub fn init() {
IDT.load();
}
use vga_buffer::print_error;
extern "C" fn page_fault_handler() -> ! {
println!("EXCEPTION: PAGE FAULT");
unsafe { print_error(format_args!("EXCEPTION: PAGE FAULT")) };
loop {}
}