diff options
| author | amlal <amlal@el-mahrouss-logic.com> | 2024-03-21 00:38:52 +0100 |
|---|---|---|
| committer | amlal <amlal@el-mahrouss-logic.com> | 2024-03-21 00:38:52 +0100 |
| commit | 333fed96b7ccd3ee4f5f097445408dde34d330db (patch) | |
| tree | a1c9894b26bd81c2e762b5487e04601b357682f2 /Public/Kits/System.Core/Heap.hxx | |
| parent | f48c5b2cda43241919d3ea1b263bef01e014c537 (diff) | |
Kernel: See below.
- Fix kernel heap, made it better.
- Fix System.Core, made it better.
Signed-off-by: amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Public/Kits/System.Core/Heap.hxx')
| -rw-r--r-- | Public/Kits/System.Core/Heap.hxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Public/Kits/System.Core/Heap.hxx b/Public/Kits/System.Core/Heap.hxx index 1bfc00de..6bad93e0 100644 --- a/Public/Kits/System.Core/Heap.hxx +++ b/Public/Kits/System.Core/Heap.hxx @@ -56,4 +56,24 @@ class Heap final { SizeT Size(HeapPtr me) noexcept; HeapPtr New(const SizeT &sz, const Int32 flags = kHeapNoFlags); }; + + +/// @brief heap exception +/// Throws when the heap pointer isn't found or invalid. +class HeapException : public SystemException { + public: + explicit HeapException() = default; + virtual ~HeapException() = default; + + public: + HCORE_COPY_DEFAULT(HeapException); + + public: + const char *Name() override { return "HeapException"; } + const char *Reason() override { return mReason; } + + private: + const char *mReason{"System.Core: HeapException: Catastrophic failure!"}; +}; + } // namespace System
\ No newline at end of file |
