Skip to content
Snippets Groups Projects

Issue 43: add exception catching code only for non-debug builds

Merged t.knopff requested to merge issue_43 into develop
3 files
+ 33
0
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 5
0
@@ -17,6 +17,7 @@
#include "GUI/main/MessageHandler.h"
#include "GUI/main/appoptions.h"
#include "GUI/mainwindow/mainwindow.h"
#include "config_build.h"
#include <QDir>
#include <QLocale>
#include <QMessageBox>
@@ -40,7 +41,9 @@ int main(int argc, char* argv[])
Application app(argc, argv);
int ret;
#if !defined(BUILD_DEBUG)
try {
#endif
qInstallMessageHandler(MessageHandler);
register1DDataLoaders();
@@ -61,6 +64,7 @@ int main(int argc, char* argv[])
ret = QApplication::exec();
app.instrumentLibrary().saveIfModified(app.instrumentLibraryFilePath());
#if !defined(BUILD_DEBUG)
} catch (...) {
QMessageBox box;
box.setWindowTitle("Fatal error");
@@ -72,6 +76,7 @@ int main(int argc, char* argv[])
box.exec();
ret = EXIT_FAILURE;
}
#endif
return ret;
}
Loading