浏览代码

Better logging

Toni Helenius 2 年之前
父节点
当前提交
831aef988c
共有 1 个文件被更改,包括 2 次插入5 次删除
  1. 2 5
      jme3-templates/src/com/jme3/gde/templates/gradledesktop/CachedOptionsContainer.java

+ 2 - 5
jme3-templates/src/com/jme3/gde/templates/gradledesktop/CachedOptionsContainer.java

@@ -98,12 +98,9 @@ public class CachedOptionsContainer {
                         ? null : mavenVersionChecker.getLatestVersion(templateLibrary.getGroupId(), templateLibrary.getArtifactId())
                                 .whenComplete((result, exception) -> {
 
-                            if (exception != null) {
+                    if (exception != null || result == null) {
                                 logger.log(Level.WARNING, exception,
-                                        () -> String.format("Failed to acquire version information for Maven artifact %s:%s", new Object[]{getGroupId(), getArtifactId()}));
-                            } else if (result == null) {
-                                logger.log(Level.WARNING,
-                                        () -> String.format("Failed to acquire version information for Maven artifact %s:%s", new Object[]{getGroupId(), getArtifactId()}));
+                                        () -> String.format("Failed to acquire version information for Maven artifact %s (%s:%s)", new Object[]{getLabel(), getGroupId(), getArtifactId()}));
                             } else {
                                 version = result;
                             }