From 9c8b55ce438869b2070ef9dbe115466cb47a528a Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 30 Jun 2019 18:16:56 +0800 Subject: ... --- include/cru/platform/exception.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include/cru/platform') diff --git a/include/cru/platform/exception.hpp b/include/cru/platform/exception.hpp index 6dae08c5..b1e505e0 100644 --- a/include/cru/platform/exception.hpp +++ b/include/cru/platform/exception.hpp @@ -6,6 +6,15 @@ namespace cru::platform { class PlatformException : public std::runtime_error { public: - using runtime_error::runtime_error; // inherent constructors + using runtime_error::runtime_error; // inherit constructors +}; + +// This exception is throwed when a resource has been disposed and not usable +// again. +// For example, calling Build twice on a GeometryBuild will lead to this +// exception. +class ReuseException : public std::runtime_error { + public: + using runtime_error::runtime_error; // inherit constructors }; } // namespace cru::platform -- cgit v1.2.3