mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-15 06:45:42 -04:00
Fix uncaught IOException
This commit is contained in:
parent
eb565285b2
commit
d61006dd67
@ -41,6 +41,7 @@ import org.jackhuang.hmcl.ui.construct.TaskExecutorDialogPane;
|
|||||||
import org.jackhuang.hmcl.util.*;
|
import org.jackhuang.hmcl.util.*;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
@ -92,11 +93,15 @@ public final class LauncherHelper {
|
|||||||
})
|
})
|
||||||
.then(Task.of(Schedulers.javafx(), () -> emitStatus(LoadingState.MODS)))
|
.then(Task.of(Schedulers.javafx(), () -> emitStatus(LoadingState.MODS)))
|
||||||
.then(var -> {
|
.then(var -> {
|
||||||
|
try {
|
||||||
ModpackConfiguration<?> configuration = ModpackHelper.readModpackConfiguration(repository.getModpackConfiguration(selectedVersion));
|
ModpackConfiguration<?> configuration = ModpackHelper.readModpackConfiguration(repository.getModpackConfiguration(selectedVersion));
|
||||||
if ("Curse".equals(configuration.getType()))
|
if ("Curse".equals(configuration.getType()))
|
||||||
return new CurseCompletionTask(dependencyManager, selectedVersion);
|
return new CurseCompletionTask(dependencyManager, selectedVersion);
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
|
} catch (IOException e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.then(Task.of(Schedulers.javafx(), () -> emitStatus(LoadingState.LOGGING_IN)))
|
.then(Task.of(Schedulers.javafx(), () -> emitStatus(LoadingState.LOGGING_IN)))
|
||||||
.then(Task.of(Launcher.i18n("account.methods"), variables -> {
|
.then(Task.of(Launcher.i18n("account.methods"), variables -> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user