mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-24 08:48:51 -05:00
* simplify error handling
This commit is contained in:
parent
d647315dd8
commit
79a0dacdbc
@ -173,7 +173,6 @@ public class Main {
|
||||
}
|
||||
|
||||
// GUI mode => start user interface
|
||||
try {
|
||||
SwingUtilities.invokeAndWait(() -> {
|
||||
try {
|
||||
// use native laf an all platforms
|
||||
@ -183,12 +182,6 @@ public class Main {
|
||||
}
|
||||
startUserInterface(args);
|
||||
});
|
||||
} catch (InvocationTargetException e) {
|
||||
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, e.getCause().getMessage(), e.getCause());
|
||||
System.exit(-1); // starting up UI failed
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e); // won't happen
|
||||
}
|
||||
|
||||
// preload media.types (when loaded during DnD it will freeze the UI for a few hundred milliseconds)
|
||||
MediaTypes.getDefault();
|
||||
@ -216,7 +209,7 @@ public class Main {
|
||||
System.exit(-1);
|
||||
} catch (Throwable e) {
|
||||
// unexpected error => dump stack
|
||||
e.printStackTrace();
|
||||
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, "Unexpected error during startup", e);
|
||||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user