From 8444c609936606a361dd2681a6e2356e0d5ee81c Mon Sep 17 00:00:00 2001 From: Russell Sim Date: Sun, 14 Jun 2020 09:07:27 +0200 Subject: Implement error handling --- proto-wine/proton.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 proto-wine/proton.h (limited to 'proto-wine/proton.h') 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 +#include + +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; +}; -- cgit v1.2.3