fix: Cato exit code is not displayed normally

This commit is contained in:
Glavo 2022-01-23 19:34:47 +08:00 committed by Yuhui Huang
parent 4cffe30910
commit e7dc23ae26

View File

@ -373,10 +373,11 @@ public class MultiplayerPage extends DecoratorAnimatedPage implements DecoratorP
}
} else if (e instanceof MultiplayerManager.CatoExitException) {
LOG.info("Cato exited accidentally");
int exitCode = ((MultiplayerManager.CatoExitException) e).getExitCode();
if (!((MultiplayerManager.CatoExitException) e).isReady()) {
return i18n("multiplayer.exit.before_ready");
return i18n("multiplayer.exit.before_ready", exitCode);
} else {
return i18n("multiplayer.exit.after_ready");
return i18n("multiplayer.exit.after_ready", exitCode);
}
} else if (e instanceof ChecksumMismatchException) {
return i18n("exception.artifact_malformed");