Force app exit if there are exceptions, don't leave the Java process running

GitOrigin-RevId: a77a0c3c2bf7b0bf514cf2af7cbb39361c00e5c3
This commit is contained in:
Rustam Vishnyakov
2019-11-25 08:32:42 +00:00
committed by intellij-monorepo-bot
parent e264c1556e
commit 1e897b5a5b
@@ -72,7 +72,12 @@ public class LightEditService implements Disposable, LightEditorListener {
myWrapperIsStale = true;
if (ProjectManager.getInstance().getOpenProjects().length == 0 && WelcomeFrame.getInstance() == null) {
Disposer.dispose(myWrapper);
ApplicationManager.getApplication().exit();
try {
ApplicationManager.getApplication().exit();
}
catch (Throwable t) {
System.exit(1);
}
}
return true;
}