Skip to content

Commit

Permalink
Merge pull request #149 from Feodor0090/load-stability
Browse files Browse the repository at this point in the history
Process exceptions during BMS list load better
  • Loading branch information
Feodor0090 authored Jun 4, 2023
2 parents c1db2a2 + 5d5f7cd commit 1ec045c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/nmania/ui/ng/BMSSelect.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ public void run() {
+ " can't be accessed. Visit settings section and choose an existing folder.",
"CHANGE NOW", new DiskSelectScreen(), 2));
return;
} catch (SecurityException e) {
Thread.sleep(1001);
loadingState = false;
disp.Push(new Alert("Failed to load charts",
"Access to current working folder " + Settings.workingFolder
+ " is forbidden. Check application OS-side settings or choose another folder.",
"CHANGE", new DiskSelectScreen(), 2));
return;
}

Vector v = new Vector();
Expand All @@ -70,6 +78,8 @@ public void run() {
loadingState = false;
} catch (Exception e) {
e.printStackTrace();
loadingState = false;
SetItems(new ListItem[] { new ListItem(-2, e.getClass().getName(), this) });
}
}

Expand Down

0 comments on commit 1ec045c

Please sign in to comment.