diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-08-15 18:35:34 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-08-15 18:35:34 +0200 |
| commit | f3d931aa7cfaf96baef8383b59a8938779541ee7 (patch) | |
| tree | fdb9fc51badb3dbd03e46ab0766a49d9522e13e2 /dev/Kernel/Sources/HError.cxx | |
| parent | 86640816e8b1d3595365f1fcc8a2a9e61fb40ff1 (diff) | |
[IMP] Moved source code into dev/ folder.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/Sources/HError.cxx')
| -rw-r--r-- | dev/Kernel/Sources/HError.cxx | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/dev/Kernel/Sources/HError.cxx b/dev/Kernel/Sources/HError.cxx new file mode 100644 index 00000000..5ccf8aea --- /dev/null +++ b/dev/Kernel/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 |
