Property format the panic message
This commit is contained in:
parent
354e15012e
commit
9cb2debd3a
1 changed files with 8 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
||||||
* Kernel object. This is the highest level object in the system.
|
* Kernel object. This is the highest level object in the system.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
#include "Kernel.hh"
|
#include "Kernel.hh"
|
||||||
#include "Interrupts.hh"
|
#include "Interrupts.hh"
|
||||||
|
|
||||||
|
@ -72,8 +73,14 @@ Kernel::panic(const char* msg,
|
||||||
{
|
{
|
||||||
mConsole.clear(Console::Color::Magenta);
|
mConsole.clear(Console::Color::Magenta);
|
||||||
mConsole.printString("PANIC! PANIC! PANIC! :-(\n");
|
mConsole.printString("PANIC! PANIC! PANIC! :-(\n");
|
||||||
mConsole.printString(msg);
|
|
||||||
|
va_list args;
|
||||||
|
va_start(args, msg);
|
||||||
|
mConsole.printFormat(msg, args);
|
||||||
|
va_end(args);
|
||||||
|
|
||||||
// TODO: Dump registers.
|
// TODO: Dump registers.
|
||||||
|
|
||||||
halt();
|
halt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue