mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-13 13:56:55 -04:00
fix: do not show install failure if it is cancelled by user.
This commit is contained in:
parent
7fccd6261e
commit
451600448e
@ -41,6 +41,7 @@ import java.net.URL;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.CancellationException;
|
||||||
import java.util.zip.ZipException;
|
import java.util.zip.ZipException;
|
||||||
|
|
||||||
import static org.jackhuang.hmcl.util.i18n.I18n.i18n;
|
import static org.jackhuang.hmcl.util.i18n.I18n.i18n;
|
||||||
@ -173,6 +174,8 @@ public final class UpdateInstallerWizardProvider implements WizardProvider {
|
|||||||
} else if (exception instanceof VersionMismatchException) {
|
} else if (exception instanceof VersionMismatchException) {
|
||||||
VersionMismatchException e = ((VersionMismatchException) exception);
|
VersionMismatchException e = ((VersionMismatchException) exception);
|
||||||
Controllers.dialog(i18n("install.failed.version_mismatch", e.getExpect(), e.getActual()), i18n("install.failed"), MessageDialogPane.MessageType.ERROR, next);
|
Controllers.dialog(i18n("install.failed.version_mismatch", e.getExpect(), e.getActual()), i18n("install.failed"), MessageDialogPane.MessageType.ERROR, next);
|
||||||
|
} else if (exception instanceof CancellationException) {
|
||||||
|
// Ignore cancel
|
||||||
} else {
|
} else {
|
||||||
Controllers.dialog(StringUtils.getStackTrace(exception), i18n("install.failed"), MessageDialogPane.MessageType.ERROR, next);
|
Controllers.dialog(StringUtils.getStackTrace(exception), i18n("install.failed"), MessageDialogPane.MessageType.ERROR, next);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user