summaryrefslogtreecommitdiffhomepage
path: root/Kernel/Sources/HError.cxx
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-06-29 23:52:17 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-06-29 23:52:17 +0200
commit397b03fd02a851abc70e750daf340966914e4239 (patch)
tree20c597eccfe7c390431938a58cdfacff9c68400a /Kernel/Sources/HError.cxx
parent0558e8040c0d9628858ddd85ce573b9c80941a1f (diff)
New err_ kernel API (with err_bug_check)
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Kernel/Sources/HError.cxx')
-rw-r--r--Kernel/Sources/HError.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/Kernel/Sources/HError.cxx b/Kernel/Sources/HError.cxx
index d38f2e07..39915f65 100644
--- a/Kernel/Sources/HError.cxx
+++ b/Kernel/Sources/HError.cxx
@@ -5,15 +5,28 @@
------------------------------------------- */
#include <KernelKit/HError.hpp>
+#include <NewKit/KernelCheck.hpp>
namespace NewOS
{
- /// @brief Doea a system wide bug check.
+ STATIC Bool cRaise = false;
+
+ /// @brief Does a system wide bug check.
/// @param void no params.
/// @return if error-free: true, otherwise false.
Boolean err_bug_check(void) noexcept
{
- /// TODO:
+ if (cRaise)
+ {
+ ke_stop(RUNTIME_CHECK_BAD_BEHAVIOR);
+ }
+
return false;
}
+
+ Void err_bug_check_raise(void) noexcept
+ {
+ if (!cRaise)
+ cRaise = true;
+ }
} // namespace NewOS