Merge pull request #128 from ianrrees/20160326-catch-exceptions-FreeCADCmd
Catch exceptions in FreeCADCmd like FreeCAD
This commit is contained in:
commit
70eeb4b475
|
@ -122,8 +122,18 @@ int main( int argc, char ** argv )
|
|||
}
|
||||
|
||||
// Run phase ===========================================================
|
||||
Application::runApplication();
|
||||
|
||||
try {
|
||||
Application::runApplication();
|
||||
}
|
||||
catch (const Base::SystemExitException&) {
|
||||
exit(0);
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
e.ReportException();
|
||||
}
|
||||
catch (...) {
|
||||
Console().Error("Application unexpectedly terminated\n");
|
||||
}
|
||||
|
||||
// Destruction phase ===========================================================
|
||||
Console().Log("FreeCAD terminating...\n");
|
||||
|
|
Loading…
Reference in New Issue
Block a user