Catch exceptions in FreeCADCmd like FreeCAD
This commit is contained in:
parent
287f3d94ca
commit
3cd752417b
|
@ -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