* don't crash in headless mode
This commit is contained in:
parent
055f9940e5
commit
3c79771e2d
|
@ -82,8 +82,8 @@ public class Analytics {
|
|||
GraphicsDevice[] display = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();
|
||||
config.setScreenResolution(getScreenResolution(display));
|
||||
config.setColorDepth(getColorDepth(display));
|
||||
} catch (HeadlessException e) {
|
||||
Logger.getLogger(Analytics.class.getName()).warning(e.getMessage());
|
||||
} catch (Throwable e) {
|
||||
Logger.getLogger(Analytics.class.getName()).finest("Headless: " + e.getMessage());
|
||||
config.setScreenResolution("80x25");
|
||||
config.setColorDepth("1");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue