From bb318751e66f123b46a6c5f06a48f9f566f7eca3 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Fri, 24 Feb 2023 14:40:18 +0900 Subject: - show the actual error & null chk Signed-off-by: syeyoung --- .../dungeonsguide/launcher/gui/screen/version/WidgetChooseBranch.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'loader/src/main/java/kr/syeyoung/dungeonsguide') diff --git a/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/gui/screen/version/WidgetChooseBranch.java b/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/gui/screen/version/WidgetChooseBranch.java index a78bffc4..e5588cb3 100644 --- a/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/gui/screen/version/WidgetChooseBranch.java +++ b/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/gui/screen/version/WidgetChooseBranch.java @@ -102,14 +102,14 @@ public class WidgetChooseBranch extends AnnotatedImportOnlyWidget { } } catch (Exception e) { e.printStackTrace(); - widgets.add(new Text("Remote Error", 0xFFFFFFFF, Text.TextAlign.CENTER, Text.WordBreak.WORD, 1.0, 8.0)); + widgets.add(new Text("Remote Error\n\n"+e.getClass().getName()+": "+e.getMessage(), 0xFFFFFFFF, Text.TextAlign.CENTER, Text.WordBreak.WORD, 1.0, 8.0)); } if (widgets.isEmpty()) { widgets.add(new Text("Seems Empty", 0xFFFFFFFF, Text.TextAlign.CENTER, Text.WordBreak.WORD, 1.0, 8.0)); } widgetList.setValue(widgets); - if (versionList.getValue().getDomElement().getWidget() != null) { + if (versionList.getValue() != null && versionList.getValue().getDomElement().getWidget() != null) { versionList.getValue().removeAll(); for (Widget widget : widgets) { versionList.getValue().addWidget(widget); -- cgit