aboutsummaryrefslogtreecommitdiff
path: root/MMCError.h
diff options
context:
space:
mode:
authorJan Dalheimer <jan@dalheimer.de>2014-03-10 19:24:29 +0100
committerJan Dalheimer <jan@dalheimer.de>2014-03-10 19:24:29 +0100
commitfcc5bc2ce0a1c8c3f9df9230710dd60363eb5cdb (patch)
tree851d8f8b6e6734e26fd2e4dc7b7477630329ff01 /MMCError.h
parent73fc9c79cff979e9023df0b1a77848c67b590681 (diff)
parentd11f10ea1ed54336254838ff068258d2d42e0774 (diff)
downloadPrismLauncher-fcc5bc2ce0a1c8c3f9df9230710dd60363eb5cdb.tar.gz
PrismLauncher-fcc5bc2ce0a1c8c3f9df9230710dd60363eb5cdb.tar.bz2
PrismLauncher-fcc5bc2ce0a1c8c3f9df9230710dd60363eb5cdb.zip
Merge branch 'develop' into feature_badges
Conflicts: logic/OneSixInstance.cpp
Diffstat (limited to 'MMCError.h')
-rw-r--r--MMCError.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/MMCError.h b/MMCError.h
new file mode 100644
index 00000000..1f72b7a4
--- /dev/null
+++ b/MMCError.h
@@ -0,0 +1,25 @@
+#pragma once
+#include <exception>
+#include <QString>
+#include <logger/QsLog.h>
+
+class MMCError : public std::exception
+{
+public:
+ MMCError(QString cause)
+ {
+ exceptionCause = cause;
+ QLOG_ERROR() << "Exception: " + cause;
+ };
+ virtual ~MMCError() noexcept {}
+ virtual const char *what() const noexcept
+ {
+ return exceptionCause.toLocal8Bit();
+ };
+ virtual QString cause() const
+ {
+ return exceptionCause;
+ }
+private:
+ QString exceptionCause;
+};