From 5beb90d84fa7b2e53a2f873ccefc02f77ed833a8 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 7 Aug 2024 11:05:47 +0200 Subject: [PATCH] Better error message for authentication failure --- vncviewer/CConn.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vncviewer/CConn.cxx b/vncviewer/CConn.cxx index 1f1a590e..219c850b 100644 --- a/vncviewer/CConn.cxx +++ b/vncviewer/CConn.cxx @@ -274,6 +274,10 @@ void CConn::socketEvent(FL_SOCKET fd, void *data) } catch (rfb::AuthCancelledException& e) { vlog.info("%s", e.str()); disconnect(); + } catch (rfb::AuthFailureException& e) { + vlog.error(_("Authentication failed: %s"), e.str()); + abort_connection(_("Failed to authenticate with the server. Reason " + "given by the server:\n\n%s"), e.str()); } catch (rdr::Exception& e) { vlog.error("%s", e.str()); abort_connection_with_unexpected_error(e); -- 2.39.5