Closed empirephoenix closed 7 years ago
Hmm... but there should always be a Lemur build date. It's made as part of the build.
On Mon, Jul 18, 2016 at 12:59 PM, empirephoenix notifications@github.com wrote:
commit cc1ea4786309822969233baec218d983b171c0d5 Author: empirephoenix empirephoenix@yahoo.de Date: Mon Jul 18 18:55:56 2016 +0200
fix selfbuild, wrong exception type
diff --git a/src/main/java/com/simsilica/lemur/GuiGlobals.java b/src/main/java/com/simsilica/lemur/GuiGlobals.java index dc0b594..cf81fd1 100644 --- a/src/main/java/com/simsilica/lemur/GuiGlobals.java +++ b/src/main/java/com/simsilica/lemur/GuiGlobals.java @@ -178,7 +178,7 @@ public class GuiGlobals { java.net.URL u = Resources.getResource("lemur.build.date"); String build = Resources.toString(u, Charsets.UTF_8); log.info("Lemur build date:" + build);
- } catch( java.io.IOException e ) {
- } catch( java.io.IOException | IllegalArgumentException e ) { log.error( "Error reading build info", e ); } }
for for: java.lang.IllegalArgumentException: resource lemur.build.date not found. at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145) at com.google.common.io.Resources.getResource(Resources.java:197) at com.simsilica.lemur.GuiGlobals.logBuildInfo(GuiGlobals.java:178) at com.simsilica.lemur.GuiGlobals.setInstance(GuiGlobals.java:121) at com.simsilica.lemur.GuiGlobals.initialize(GuiGlobals.java:115) at de.visiongamestudios.client.jme.RendererApplication.simpleInitApp(RendererApplication.java:428) at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220) at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130) at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211) at java.lang.Thread.run(Unknown Source)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jMonkeyEngine-Contributions/Lemur/issues/38, or mute the thread https://github.com/notifications/unsubscribe-auth/AGrfnoX3cHxjAjwgllK20dm0L8jjeVz8ks5qW7DwgaJpZM4JO7A6 .
Empire, do you still remember under what situation you didn't have a build date?
Hm I just checked out, imported it into my favourite ide (after adding plugin for gradle). So that part of the build might never have been executed, as the task might be outside the plugin file generation. If i remember it right, my jdk (oracle) seems to fire another exception (im on linux) than the onex that are catched to handle this.
I widened the catch() to grab all Exceptions. Given that this is not critical code it seemed the safest option to let lemur keep running in case of problems reading or parsing that file.
commit cc1ea4786309822969233baec218d983b171c0d5 Author: empirephoenix empirephoenix@yahoo.de Date: Mon Jul 18 18:55:56 2016 +0200
diff --git a/src/main/java/com/simsilica/lemur/GuiGlobals.java b/src/main/java/com/simsilica/lemur/GuiGlobals.java index dc0b594..cf81fd1 100644 --- a/src/main/java/com/simsilica/lemur/GuiGlobals.java +++ b/src/main/java/com/simsilica/lemur/GuiGlobals.java @@ -178,7 +178,7 @@ public class GuiGlobals { java.net.URL u = Resources.getResource("lemur.build.date"); String build = Resources.toString(u, Charsets.UTF_8); log.info("Lemur build date:" + build);
for for: java.lang.IllegalArgumentException: resource lemur.build.date not found. at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145) at com.google.common.io.Resources.getResource(Resources.java:197) at com.simsilica.lemur.GuiGlobals.logBuildInfo(GuiGlobals.java:178) at com.simsilica.lemur.GuiGlobals.setInstance(GuiGlobals.java:121) at com.simsilica.lemur.GuiGlobals.initialize(GuiGlobals.java:115) at de.visiongamestudios.client.jme.RendererApplication.simpleInitApp(RendererApplication.java:428) at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220) at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130) at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211) at java.lang.Thread.run(Unknown Source)