Exit application with non-zero general error status code if an exception is raised

This commit is contained in:
Bruce B. Lacey 2016-10-08 15:57:50 -07:00
parent e0b9e29db9
commit 400891fcfe
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) {
e.ReportException();
exit(1);
}
catch (...) {
Console().Error("Application unexpectedly terminated\n");
exit(1);
}
// Destruction phase ===========================================================

View File

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