summaryrefslogtreecommitdiffstats
path: root/MMCError.h
blob: 1f72b7a487fd4b8c34d957b30b9d1fa309248cbc (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() noexcept {}
	virtual const char *what() const noexcept
	{
		return exceptionCause.toLocal8Bit();
	};
	virtual QString cause() const
	{
		return exceptionCause;
	}
private:
	QString exceptionCause;
};