summaryrefslogtreecommitdiffstats
path: root/logic/MMCError.h
diff options
context:
space:
mode:
Diffstat (limited to 'logic/MMCError.h')
-rw-r--r--logic/MMCError.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/logic/MMCError.h b/logic/MMCError.h
new file mode 100644
index 00000000..e81054a6
--- /dev/null
+++ b/logic/MMCError.h
@@ -0,0 +1,25 @@
+#pragma once
+#include <exception>
+#include <QString>
+#include <QDebug>
+
+class MMCError : public std::exception
+{
+public:
+ MMCError(QString cause)
+ {
+ exceptionCause = cause;
+ qCritical() << "Exception: " + cause;
+ };
+ virtual ~MMCError() noexcept {}
+ virtual const char *what() const noexcept
+ {
+ return exceptionCause.toLocal8Bit();
+ };
+ virtual QString cause() const
+ {
+ return exceptionCause;
+ }
+private:
+ QString exceptionCause;
+};