fix: Cato exit code is not displayed normally

This commit is contained in:
Glavo authored and Yuhui Huang committed 2022-01-23 19:36:31 +08:00
1 parent 4cffe30910
commit e7dc23ae26
1 file changed
+3 -2
@@ -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");