Merge pull request #305 from bblacey/develop

Exit application with non-zero general error status code if an except…
This commit is contained in:
wwmayer 2016-10-09 11:18:34 +02:00 committed by GitHub
commit f2a84b0364
2 changed files with 4 additions and 0 deletions

View File

@ -130,9 +130,11 @@ int main( int argc, char ** argv )
} }
catch (const Base::Exception& e) { catch (const Base::Exception& e) {
e.ReportException(); e.ReportException();
exit(1);
} }
catch (...) { catch (...) {
Console().Error("Application unexpectedly terminated\n"); Console().Error("Application unexpectedly terminated\n");
exit(1);
} }
// Destruction phase =========================================================== // Destruction phase ===========================================================

View File

@ -241,9 +241,11 @@ int main( int argc, char ** argv )
} }
catch (const Base::Exception& e) { catch (const Base::Exception& e) {
e.ReportException(); e.ReportException();
exit(1);
} }
catch (...) { catch (...) {
Base::Console().Error("Application unexpectedly terminated\n"); Base::Console().Error("Application unexpectedly terminated\n");
exit(1);
} }
std::cout.rdbuf(oldcout); std::cout.rdbuf(oldcout);