graphical exception [temporary solution]

performance fixes
minor changes
This commit is contained in:
2016-09-29 21:03:49 +02:00
parent 4f511d907e
commit e75327090d
6 changed files with 46 additions and 20 deletions

View File

@@ -4,6 +4,10 @@
#include <exception>
#include <string>
#ifdef ANDROID
#include <QMessageBox>
#endif
class Exception : public std::exception {
private:
@@ -14,7 +18,14 @@ private:
public:
/** ctor */
Exception(const std::string& str) : str(str) {;}
Exception(const std::string& str) : str(str) {
// TODO better solution?
#ifdef ANDROID
QMessageBox::question(nullptr, "Exception", str.c_str(), QMessageBox::Ok);
#endif
}
const char* what() const throw() {return str.c_str();}