소스 검색

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;
                             }