aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/exception.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-12-12 19:53:17 +0800
committercrupest <crupest@outlook.com>2019-12-12 19:53:17 +0800
commite69911a8b161b81ce3f7b209175766da2b7b3d4b (patch)
tree76b1f4b6f9f5ad6111578771be783ee456aeb912 /include/cru/platform/exception.hpp
parent154b5b838edfdcef93cd0a33c013ad7f5f9d7337 (diff)
downloadcru-e69911a8b161b81ce3f7b209175766da2b7b3d4b.tar.gz
cru-e69911a8b161b81ce3f7b209175766da2b7b3d4b.tar.bz2
cru-e69911a8b161b81ce3f7b209175766da2b7b3d4b.zip
...
Diffstat (limited to 'include/cru/platform/exception.hpp')
-rw-r--r--include/cru/platform/exception.hpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/cru/platform/exception.hpp b/include/cru/platform/exception.hpp
index ad6827c0..1774b12c 100644
--- a/include/cru/platform/exception.hpp
+++ b/include/cru/platform/exception.hpp
@@ -9,10 +9,18 @@ class PlatformException : public std::runtime_error {
using runtime_error::runtime_error; // inherit constructors
};
-// This exception is throwed when a resource has been disposed and not usable
+// This exception is thrown when a resource is used on another platform.
+// Of course, you can't mix resources of two different platform.
+// For example, Win32 Brush (may add in the future) with Direct Painter.
+class UnsupportPlatformException : public std::runtime_error {
+ public:
+ using runtime_error::runtime_error; // inherit constructors
+};
+
+// This exception is thrown when a resource has been disposed and not usable
// again.
-// For example, calling Build twice on a GeometryBuilder::Build will lead to this
-// exception.
+// For example, calling Build twice on a GeometryBuilder::Build will lead to
+// this exception.
class ReuseException : public std::runtime_error {
public:
using runtime_error::runtime_error; // inherit constructors