新增异常捕获提示信息的本地化支持

This commit is contained in:
Xujiayao 2026-01-23 13:13:46 +08:00
parent f50e29ad45
commit 616a8a704c
3 changed files with 3 additions and 1 deletions

View file

@ -142,7 +142,7 @@ public class ServerHandler extends SimpleChannelInboundHandler<Packet> {
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
LOGGER.error("Exception in ServerHandler", cause);
LOGGER.error(I18nManager.getDmccTranslation("server.network.exception_caught"), cause);
ctx.close();
}

View file

@ -78,6 +78,7 @@ server:
not_whitelisted: "Name \"{}\" is not whitelisted."
version_mismatch: "Version mismatch. Client: {}, Server: {}"
auth_failed: "Authentication failed. Please check your shared secret."
exception_caught: "Netty caught an exception."
client:
startup_interrupted: "DMCC Client startup was interrupted."

View file

@ -78,6 +78,7 @@ server:
not_whitelisted: "名称 \"{}\" 不在白名单中。"
version_mismatch: "版本不匹配。客户端:{},服务端:{}"
auth_failed: "验证失败。请检查你的共享密钥。"
exception_caught: "Netty 捕获到一个异常。"
client:
startup_interrupted: "DMCC 客户端启动被中断。"