projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CMakeLists.txt: Set DISABLE_WERROR to TRUE by default.
[pulseview.git]
/
pv
/
application.cpp
diff --git
a/pv/application.cpp
b/pv/application.cpp
index 383b5c23d29737c6c14ebb537b4756a57ee83139..c16c9c4b7c757e3a4312316bb69edb668ef2615e 100644
(file)
--- a/
pv/application.cpp
+++ b/
pv/application.cpp
@@
-20,10
+20,14
@@
#include "application.hpp"
#include "config.h"
#include "application.hpp"
#include "config.h"
-#include <iostream>
+#include <typeinfo>
+
+#include <QDebug>
+
+#ifdef ENABLE_STACKTRACE
+#include <boost/stacktrace.hpp>
+#endif
-using std::cerr;
-using std::endl;
using std::exception;
Application::Application(int &argc, char* argv[]) :
using std::exception;
Application::Application(int &argc, char* argv[]) :
@@
-40,8
+44,13
@@
bool Application::notify(QObject *receiver, QEvent *event)
try {
return QApplication::notify(receiver, event);
} catch (exception& e) {
try {
return QApplication::notify(receiver, event);
} catch (exception& e) {
- cerr << "Caught exception: " << e.what() << endl;
+ qDebug().nospace() << "Caught exception of type " << \
+ typeid(e).name() << " (" << e.what() << ")";
+#ifdef ENABLE_STACKTRACE
+ throw e;
+#else
exit(1);
exit(1);
+#endif
return false;
}
}
return false;
}
}