diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2025-07-14 16:02:43 +0000 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2025-07-14 16:02:43 +0000 |
| commit | 25483b7af8df6b08d460f807fda04c6d409bd44e (patch) | |
| tree | 2001f9774fe179dd4a67c77f590aa7ee1406fb87 /kern/src/error.cpp | |
| parent | 1b603d1145b9ee10b1b12a0f765bd2bc1ebe2b3c (diff) | |
| download | teachos-25483b7af8df6b08d460f807fda04c6d409bd44e.tar.xz teachos-25483b7af8df6b08d460f807fda04c6d409bd44e.zip | |
ide: start large-scale restructuring
Diffstat (limited to 'kern/src/error.cpp')
| -rw-r--r-- | kern/src/error.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/kern/src/error.cpp b/kern/src/error.cpp new file mode 100644 index 0000000..a5229fd --- /dev/null +++ b/kern/src/error.cpp @@ -0,0 +1,19 @@ +#include "kern/error.hpp" + +#include "arch/system.hpp" +#include "kern/print.hpp" + +namespace teachos +{ + + auto panic(std::string_view message, std::source_location location) -> void + { + println_error("!!!Kernel Panic!!! "); + println_error(message); + println_error(location.file_name()); + println_error(location.function_name()); + + arch::system::halt(); + } + +} // namespace teachos |
