diff options
author | Erlang/OTP <otp@erlang.org> | 2023-02-22 15:28:59 +0100 |
---|---|---|
committer | Erlang/OTP <otp@erlang.org> | 2023-02-22 15:28:59 +0100 |
commit | f70b7d12d6eb9d94cd46054b9aaf8342ad90191f (patch) | |
tree | 4315fad5c9c408e76658d9a282eef9b74189561f | |
parent | b617411a927d5374b2295bf90aa1cbf7e1c0b896 (diff) | |
parent | afda3f30b9503c905b260faab532532309ed9757 (diff) | |
download | erlang-f70b7d12d6eb9d94cd46054b9aaf8342ad90191f.tar.gz |
Merge branch 'kuba/maint-24/ssh/fix-error-logging/OTP-18386' into maint-24
* kuba/maint-24/ssh/fix-error-logging/OTP-18386:
ssh: fix kexinit error generation
-rw-r--r-- | lib/ssh/src/ssh_transport.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/ssh/src/ssh_transport.erl b/lib/ssh/src/ssh_transport.erl index e43c345130..4619400cfe 100644 --- a/lib/ssh/src/ssh_transport.erl +++ b/lib/ssh/src/ssh_transport.erl @@ -432,7 +432,12 @@ kexinit_error(Class, Error, Role, Own, CounterPart) -> _ -> {"Kexinit failed in ~p: ~p:~p", [Role,Class,Error]} end, - io_lib:format(Fmt, Args). + try io_lib:format(Fmt, Args) of + R -> R + catch + _:_ -> + io_lib:format("Kexinit failed in ~p: ~p:~p", [Role, Class, Error]) + end. alg_info(client, Alg) -> alg_info(Alg); |