Skip to content

Commit 2d950d6

Browse files
committed
Catch rare exception
1 parent 336a87e commit 2d950d6

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/main/java/com/itzilly/shadowOverlay/ui/MainWindowController.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,19 @@ public void initialize(URL url, ResourceBundle resourceBundle) {
3737
playerColumn.setCellValueFactory(new PropertyValueFactory<OverlayPlayer, String>("name"));
3838
starsColumn.setCellValueFactory(new PropertyValueFactory<OverlayPlayer, Integer>("bedwarsLevel"));
3939

40-
YmlConfig cnf = new YmlConfig();
41-
42-
String key = cnf.getString("API_KEY");
43-
if (key.equals("null")) { key = ""; }
44-
txtbxApiKey.setText(key);
45-
46-
String logPath = cnf.getString("LOG_PATH");
47-
if (logPath.equals("null")) { logPath = ""; }
48-
txtbxLogPath.setText(logPath);
40+
try {
41+
YmlConfig cnf = new YmlConfig();
42+
43+
String key = cnf.getString("API_KEY");
44+
if (key.equals("null")) { key = ""; }
45+
txtbxApiKey.setText(key);
46+
47+
String logPath = cnf.getString("LOG_PATH");
48+
if (logPath.equals("null")) { logPath = ""; }
49+
txtbxLogPath.setText(logPath);
50+
} catch (Exception e) {
51+
e.printStackTrace();
52+
}
4953
}
5054

5155

0 commit comments

Comments
 (0)