2014-03-02 23:42:04 +05:30
|
|
|
#pragma once
|
|
|
|
#include <exception>
|
|
|
|
#include <QString>
|
2015-02-02 06:44:14 +05:30
|
|
|
#include <QDebug>
|
2014-03-02 23:42:04 +05:30
|
|
|
|
|
|
|
class MMCError : public std::exception
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MMCError(QString cause)
|
|
|
|
{
|
|
|
|
exceptionCause = cause;
|
2015-02-02 06:44:14 +05:30
|
|
|
qCritical() << "Exception: " + cause;
|
2014-03-02 23:42:04 +05:30
|
|
|
};
|
2014-03-10 23:25:54 +05:30
|
|
|
virtual ~MMCError() noexcept {}
|
2014-03-02 23:42:04 +05:30
|
|
|
virtual const char *what() const noexcept
|
|
|
|
{
|
|
|
|
return exceptionCause.toLocal8Bit();
|
|
|
|
};
|
|
|
|
virtual QString cause() const
|
|
|
|
{
|
|
|
|
return exceptionCause;
|
|
|
|
}
|
|
|
|
private:
|
|
|
|
QString exceptionCause;
|
2014-03-10 04:12:25 +05:30
|
|
|
};
|