2014-03-02 18:12:04 +00:00
|
|
|
#pragma once
|
|
|
|
#include <exception>
|
|
|
|
#include <QString>
|
|
|
|
#include <logger/QsLog.h>
|
|
|
|
|
|
|
|
class MMCError : public std::exception
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MMCError(QString cause)
|
|
|
|
{
|
|
|
|
exceptionCause = cause;
|
2014-03-09 22:42:25 +00:00
|
|
|
QLOG_ERROR() << "Exception: " + cause;
|
2014-03-02 18:12:04 +00:00
|
|
|
};
|
2014-03-10 17:55:54 +00:00
|
|
|
virtual ~MMCError() noexcept {}
|
2014-03-02 18:12:04 +00:00
|
|
|
virtual const char *what() const noexcept
|
|
|
|
{
|
|
|
|
return exceptionCause.toLocal8Bit();
|
|
|
|
};
|
|
|
|
virtual QString cause() const
|
|
|
|
{
|
|
|
|
return exceptionCause;
|
|
|
|
}
|
|
|
|
private:
|
|
|
|
QString exceptionCause;
|
2014-03-09 22:42:25 +00:00
|
|
|
};
|