mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-10 20:37:30 -04:00
Log authentication exceptions
This commit is contained in:
parent
37186439cb
commit
bb0c11fa12
@ -63,6 +63,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||||||
|
|
||||||
import static org.jackhuang.hmcl.setting.ConfigHolder.config;
|
import static org.jackhuang.hmcl.setting.ConfigHolder.config;
|
||||||
import static org.jackhuang.hmcl.util.Lang.mapOf;
|
import static org.jackhuang.hmcl.util.Lang.mapOf;
|
||||||
|
import static org.jackhuang.hmcl.util.Logging.LOG;
|
||||||
import static org.jackhuang.hmcl.util.Pair.pair;
|
import static org.jackhuang.hmcl.util.Pair.pair;
|
||||||
import static org.jackhuang.hmcl.util.i18n.I18n.i18n;
|
import static org.jackhuang.hmcl.util.i18n.I18n.i18n;
|
||||||
|
|
||||||
@ -145,8 +146,10 @@ public final class LauncherHelper {
|
|||||||
try {
|
try {
|
||||||
variables.set("account", account.logIn());
|
variables.set("account", account.logIn());
|
||||||
} catch (CredentialExpiredException e) {
|
} catch (CredentialExpiredException e) {
|
||||||
|
LOG.info("Credential has expired: " + e);
|
||||||
variables.set("account", DialogController.logIn(account));
|
variables.set("account", DialogController.logIn(account));
|
||||||
} catch (AuthenticationException e) {
|
} catch (AuthenticationException e) {
|
||||||
|
LOG.warning("Authentication failed, try playing offline: " + e);
|
||||||
variables.set("account",
|
variables.set("account",
|
||||||
account.playOffline().orElseThrow(() -> e));
|
account.playOffline().orElseThrow(() -> e));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user