From da70596895d8135e08f8caac6978117697b4c021 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 18 Aug 2024 21:39:29 +0200 Subject: [REFACTOR] Improved project structure. Signed-off-by: Amlal El Mahrouss --- dev/ZKA/Sources/HError.cxx | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 dev/ZKA/Sources/HError.cxx (limited to 'dev/ZKA/Sources/HError.cxx') diff --git a/dev/ZKA/Sources/HError.cxx b/dev/ZKA/Sources/HError.cxx new file mode 100644 index 00000000..5ccf8aea --- /dev/null +++ b/dev/ZKA/Sources/HError.cxx @@ -0,0 +1,34 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#include +#include + +namespace Kernel +{ + 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 + { + if (cRaise) + { + ke_stop(RUNTIME_CHECK_BAD_BEHAVIOR); + } + + return true; + } + + /// @brief Tells if we should raise a bug check not. + /// @param void + /// @return void + Void err_bug_check_raise(Void) noexcept + { + cRaise = true; + } +} // namespace Kernel -- cgit v1.2.3