summaryrefslogtreecommitdiffhomepage
path: root/Public/Kits/System.Core/Heap.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'Public/Kits/System.Core/Heap.hxx')
-rw-r--r--Public/Kits/System.Core/Heap.hxx20
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