Skip to content

Commit

Permalink
make try catch in audio switcher catch throwable instead of exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest committed Nov 13, 2024
1 parent 6b34b06 commit 3dd2fba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public List<String> getAvailableDevices(boolean useCache) {
private String[] getAvailableDevicesString() {
try {
return ALC10.alcGetString(null, ALC11.ALC_ALL_DEVICES_SPECIFIER).split("\0");
} catch (Exception ignored) {
} catch (Throwable ignored) {
try {
return ALC10.alcGetString(null, ALC10.ALC_DEVICE_SPECIFIER).split("\0");
} catch (Exception ignored2) {
} catch (Throwable ignored2) {
return null;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static void createAL() throws LWJGLException {
} else {
AL.create();
}
} catch (Exception e) {
} catch (Throwable e) {
Patcher.instance.getLogger().error("Failed to create device, using system default.", e);
AL.destroy();
AL.create();
Expand Down

0 comments on commit 3dd2fba

Please sign in to comment.