Log exception when failing to load version list

see https://github.com/huanghongxun/HMCL/issues/489#issuecomment-443427026
This commit is contained in:
yushijinhun 2018-12-02 13:55:25 +08:00
parent ef6cfa785f
commit db59dcea65
No known key found for this signature in database
GPG Key ID: 5BC167F73EA558E4

View File

@ -17,6 +17,8 @@
*/ */
package org.jackhuang.hmcl.ui.download; package org.jackhuang.hmcl.ui.download;
import static org.jackhuang.hmcl.util.Logging.LOG;
import com.jfoenix.controls.JFXCheckBox; import com.jfoenix.controls.JFXCheckBox;
import com.jfoenix.controls.JFXListView; import com.jfoenix.controls.JFXListView;
import com.jfoenix.controls.JFXSpinner; import com.jfoenix.controls.JFXSpinner;
@ -38,6 +40,7 @@ import org.jackhuang.hmcl.ui.wizard.WizardPage;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.logging.Level;
import java.util.stream.Collectors; import java.util.stream.Collectors;
public final class VersionsPage extends StackPane implements WizardPage, Refreshable { public final class VersionsPage extends StackPane implements WizardPage, Refreshable {
@ -139,6 +142,7 @@ public final class VersionsPage extends StackPane implements WizardPage, Refresh
} }
}); });
} else { } else {
LOG.log(Level.WARNING, "Failed to fetch versions list", (Throwable) variables.get("lastException"));
Platform.runLater(() -> { Platform.runLater(() -> {
transitionHandler.setContent(failedPane, ContainerAnimations.FADE.getAnimationProducer()); transitionHandler.setContent(failedPane, ContainerAnimations.FADE.getAnimationProducer());
}); });