aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/exception.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-06-30 18:16:56 +0800
committercrupest <crupest@outlook.com>2019-06-30 18:16:56 +0800
commit9c8b55ce438869b2070ef9dbe115466cb47a528a (patch)
treee195cbd245ec41ac75cd7ed29daa2a8c4b656b68 /include/cru/platform/exception.hpp
parent7b17e8045bde2d36dc6af5f66e75e44593564086 (diff)
downloadcru-9c8b55ce438869b2070ef9dbe115466cb47a528a.tar.gz
cru-9c8b55ce438869b2070ef9dbe115466cb47a528a.tar.bz2
cru-9c8b55ce438869b2070ef9dbe115466cb47a528a.zip
...
Diffstat (limited to 'include/cru/platform/exception.hpp')
-rw-r--r--include/cru/platform/exception.hpp11
1 files changed, 10 insertions, 1 deletions
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