graphical exception [temporary solution]
performance fixes minor changes
This commit is contained in:
13
Exception.h
13
Exception.h
@@ -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();}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user