catch only Exceptions here, leaving Errors to a more outer handler

This commit is contained in:
Anton Keks 2017-01-26 22:26:17 +02:00
parent c1f43de183
commit 9bed7c364b

View File

@ -74,9 +74,9 @@ public class Main {
if (!display.readAndDispatch())
display.sleep();
}
catch (Throwable e) {
if (e instanceof SWTException && e.getCause() != null)
e = e.getCause();
catch (Exception e) {
if (e instanceof SWTException && e.getCause() instanceof Exception)
e = (Exception) e.getCause();
// display a nice error message
String localizedMessage = getLocalizedMessage(e);