Display error codes when the connection is terminated

This commit is contained in:
Cameron Gutman 2023-12-22 14:12:59 -06:00
parent 2cef09471b
commit 9ed8252cc6
2 changed files with 6 additions and 2 deletions

View file

@ -132,7 +132,11 @@ void Session::clConnectionTerminated(int errorCode)
default:
s_ActiveSession->m_UnexpectedTermination = true;
emit s_ActiveSession->displayLaunchError(tr("Connection terminated"));
// We'll assume large errors are hex values
bool hexError = qAbs(errorCode) > 1000;
emit s_ActiveSession->displayLaunchError(tr("Connection terminated") + "\n\n" +
tr("Error code: %1").arg(errorCode, hexError ? 8 : 0, hexError ? 16 : 10, QChar('0')));
break;
}

@ -1 +1 @@
Subproject commit 3ed3ba62534ce06c1b97fec46722969e7710fee6
Subproject commit 3aae4cdc595ff6f428a2abbfb9d5055c03423bc2