#ifndef EXCEPTION_H #define EXCEPTION_H #include #include #ifdef ANDROID //include #include #endif class Exception : public std::exception { private: /** the exception message */ std::string str; public: /** ctor */ Exception(const std::string& str) : str(str) { // TODO better solution? #ifdef ANDROID qDebug() << "-------- ERROR --------"; qDebug() << str.c_str(); qDebug() << "------------------------"; //QMessageBox::question(nullptr, "Exception", str.c_str(), QMessageBox::Ok); #endif } const char* what() const throw() {return str.c_str();} }; #endif // EXCEPTION_H