diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-08-18 21:39:29 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-08-18 21:39:29 +0200 |
| commit | da70596895d8135e08f8caac6978117697b4c021 (patch) | |
| tree | 2516785b5434df8453687f05dc8dd877438901ab /dev/ZKA/Sources/HError.cxx | |
| parent | 005de79004c9d30e64bdee6e14e06f9d47d1f2ab (diff) | |
[REFACTOR]
Improved project structure.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ZKA/Sources/HError.cxx')
| -rw-r--r-- | dev/ZKA/Sources/HError.cxx | 34 |
1 files changed, 34 insertions, 0 deletions
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 <KernelKit/LPC.hxx> +#include <NewKit/KernelCheck.hxx> + +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 |
