refactor: 调整编码公钥失败时的动作.

编码公钥失败时的异常不应该被隐藏, 但为了保持鲁棒性, 我决定把异常直接打印到日志中.
This commit is contained in:
LamGC 2021-08-20 02:29:54 +08:00
parent 35c45a858c
commit 4609e146d9
Signed by: LamGC
GPG Key ID: 6C5AE2A913941E1D

View File

@ -112,7 +112,8 @@ public final class SshAuthInfoSerializer implements JsonSerializer<SshAuthInfo>,
StringBuilder builder = new StringBuilder();
PublicKeyEntry.appendPublicKeyEntry(builder, key);
return builder.toString();
} catch (IOException ignored) {
} catch (IOException e) {
log.error("ServerKey 编码失败, 下次加载时需要进行首次连接认证.", e);
}
return null;
}