summaryrefslogtreecommitdiffstats
path: root/logic/MMCError.h
blob: e81054a67eb13e3066345a2812cc1fc705347e0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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;
};