This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
Indoor/Exception.h
kazu e75327090d graphical exception [temporary solution]
performance fixes
minor changes
2016-09-29 21:03:49 +02:00

35 lines
530 B
C++
Executable File

#ifndef EXCEPTION_H
#define EXCEPTION_H
#include <exception>
#include <string>
#ifdef ANDROID
#include <QMessageBox>
#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
QMessageBox::question(nullptr, "Exception", str.c_str(), QMessageBox::Ok);
#endif
}
const char* what() const throw() {return str.c_str();}
};
#endif // EXCEPTION_H