* don't crash in headless mode

This commit is contained in:
Reinhard Pointner 2011-10-14 09:51:45 +00:00
parent 055f9940e5
commit 3c79771e2d
1 changed files with 2 additions and 2 deletions

View File

@ -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");
}