summaryrefslogtreecommitdiffhomepage
path: root/proto-wine/proton.h
diff options
context:
space:
mode:
authorRussell Sim <russell.sim@gmail.com>2020-06-14 09:07:27 +0200
committerRussell Sim <russell.sim@gmail.com>2020-06-14 09:08:35 +0200
commit8444c609936606a361dd2681a6e2356e0d5ee81c (patch)
treeddd8bee7bc99015b1470fce1cca8f2cf54736951 /proto-wine/proton.h
parentbeac0c60e8188cb593ac82df2c0773576b493c93 (diff)
Implement error handling
Diffstat (limited to 'proto-wine/proton.h')
-rw-r--r--proto-wine/proton.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/proto-wine/proton.h b/proto-wine/proton.h
new file mode 100644
index 00000000..08179c3d
--- /dev/null
+++ b/proto-wine/proton.h
@@ -0,0 +1,23 @@
+#pragma once
+
+#include <QString>
+#include <QException>
+
+class ProtonException : public QException
+{
+public:
+ ProtonException(const QString& message)
+ : message(message) {}
+
+ virtual ~ProtonException()
+ {}
+
+ void raise() const { throw *this; }
+ ProtonException *clone() const { return new ProtonException(*this); }
+
+ QString getMessage() const {
+ return message;
+ }
+private:
+ QString message;
+};