Main: [skip ci] handle C++ exception in main() function
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <cstdio>
|
||||
#include <QApplication>
|
||||
@@ -309,6 +310,10 @@ int main( int argc, char ** argv )
|
||||
e.ReportException();
|
||||
exit(1);
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
Base::Console().Error("Application unexpectedly terminated: %s\n", e.what());
|
||||
exit(1);
|
||||
}
|
||||
catch (...) {
|
||||
Base::Console().Error("Application unexpectedly terminated\n");
|
||||
exit(1);
|
||||
|
||||
Reference in New Issue
Block a user