summaryrefslogtreecommitdiffstats
path: root/MMCError.h
blob: 7b2bd0c4764ca7b12e4453b34caf71022a70bb21 (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 <logger/QsLog.h>

class MMCError : public std::exception
{
public:
	MMCError(QString cause)
	{
		exceptionCause = cause;
		QLOG_ERROR() << "Exception: " + cause;
	};
	virtual ~MMCError(){};
	virtual const char *what() const noexcept
	{
		return exceptionCause.toLocal8Bit();
	};
	virtual QString cause() const
	{
		return exceptionCause;
	}
private:
	QString exceptionCause;
};