diff --git a/src/libs/ssh/sshchannel.cpp b/src/libs/ssh/sshchannel.cpp index f4ae59a97df..d48622b36f1 100644 --- a/src/libs/ssh/sshchannel.cpp +++ b/src/libs/ssh/sshchannel.cpp @@ -75,7 +75,7 @@ void AbstractSshChannel::requestSessionStart() m_sendFacility.sendSessionPacket(m_localChannel, initialWindowSize(), maxPacketSize()); setChannelState(SessionRequested); m_timeoutTimer.start(ReplyTimeout); - } catch (const Botan::Exception &e) { + } catch (const std::exception &e) { qCWarning(sshLog, "Botan error: %s", e.what()); closeChannel(); } @@ -86,7 +86,7 @@ void AbstractSshChannel::sendData(const QByteArray &data) try { m_sendBuffer += data; flushSendBuffer(); - } catch (const Botan::Exception &e) { + } catch (const std::exception &e) { qCWarning(sshLog, "Botan error: %s", e.what()); closeChannel(); } diff --git a/src/libs/ssh/sshchannelmanager.cpp b/src/libs/ssh/sshchannelmanager.cpp index d3e8e4dd3b2..364d1dcfe24 100644 --- a/src/libs/ssh/sshchannelmanager.cpp +++ b/src/libs/ssh/sshchannelmanager.cpp @@ -91,7 +91,7 @@ void SshChannelManager::handleChannelOpen(const SshIncomingPacket &packet) try { m_sendFacility.sendChannelOpenFailurePacket(channelOpen.remoteChannel, reason, QByteArray()); - } catch (const Botan::Exception &e) { + } catch (const std::exception &e) { qCWarning(sshLog, "Botan error: %s", e.what()); } return; diff --git a/src/libs/ssh/sshconnection.cpp b/src/libs/ssh/sshconnection.cpp index a98529371d9..5b5a20cad83 100644 --- a/src/libs/ssh/sshconnection.cpp +++ b/src/libs/ssh/sshconnection.cpp @@ -199,7 +199,7 @@ int SshConnection::closeAllChannels() { try { return d->m_channelManager->closeAllChannels(Internal::SshChannelManager::CloseAllRegular); - } catch (const Botan::Exception &e) { + } catch (const std::exception &e) { qCWarning(Internal::sshLog, "%s: %s", Q_FUNC_INFO, e.what()); return -1; } @@ -344,7 +344,7 @@ void SshConnectionPrivate::handleIncomingData() } catch (const SshClientException &e) { closeConnection(SSH_DISCONNECT_BY_APPLICATION, e.error, "", e.errorString); - } catch (const Botan::Exception &e) { + } catch (const std::exception &e) { closeConnection(SSH_DISCONNECT_BY_APPLICATION, SshInternalError, "", tr("Botan library exception: %1").arg(QString::fromLatin1(e.what()))); } diff --git a/src/libs/ssh/sshcryptofacility.cpp b/src/libs/ssh/sshcryptofacility.cpp index bfd853be42b..7156fd801ad 100644 --- a/src/libs/ssh/sshcryptofacility.cpp +++ b/src/libs/ssh/sshcryptofacility.cpp @@ -272,10 +272,7 @@ bool SshEncryptionFacility::createAuthenticationKeyFromPKCS8(const QByteArray &p Q_FUNC_INFO); return false; } - } catch (const Exception &ex) { - error = QLatin1String(ex.what()); - return false; - } catch (const Decoding_Error &ex) { + } catch (const std::exception &ex) { error = QLatin1String(ex.what()); return false; } @@ -360,10 +357,7 @@ bool SshEncryptionFacility::createAuthenticationKeyFromOpenSSL(const QByteArray sequence.discard_remaining(); sequence.verify_end(); - } catch (const Exception &ex) { - error = QLatin1String(ex.what()); - return false; - } catch (const Decoding_Error &ex) { + } catch (const std::exception &ex) { error = QLatin1String(ex.what()); return false; } diff --git a/src/libs/ssh/sshdirecttcpiptunnel.cpp b/src/libs/ssh/sshdirecttcpiptunnel.cpp index e3b21531a27..9700bd99c66 100644 --- a/src/libs/ssh/sshdirecttcpiptunnel.cpp +++ b/src/libs/ssh/sshdirecttcpiptunnel.cpp @@ -103,7 +103,7 @@ void SshDirectTcpIpTunnel::initialize() d->m_originatingHost.toUtf8(), d->m_originatingPort); d->setChannelState(AbstractSshChannel::SessionRequested); d->m_timeoutTimer.start(d->ReplyTimeout); - } catch (const Botan::Exception &e) { // Won't happen, but let's play it safe. + } catch (const std::exception &e) { // Won't happen, but let's play it safe. qCWarning(sshLog, "Botan error: %s", e.what()); d->closeChannel(); } diff --git a/src/libs/ssh/sshforwardedtcpiptunnel.cpp b/src/libs/ssh/sshforwardedtcpiptunnel.cpp index 0175dd03138..22442f7c80c 100644 --- a/src/libs/ssh/sshforwardedtcpiptunnel.cpp +++ b/src/libs/ssh/sshforwardedtcpiptunnel.cpp @@ -45,7 +45,7 @@ void SshForwardedTcpIpTunnelPrivate::handleOpenSuccessInternal() try { m_sendFacility.sendChannelOpenConfirmationPacket(remoteChannel(), localChannelId(), initialWindowSize(), maxPacketSize()); - } catch (const Botan::Exception &e) { // Won't happen, but let's play it safe. + } catch (const std::exception &e) { // Won't happen, but let's play it safe. qCWarning(sshLog, "Botan error: %s", e.what()); closeChannel(); } diff --git a/src/libs/ssh/sshkeygenerator.cpp b/src/libs/ssh/sshkeygenerator.cpp index 253e45f6a47..eb85c1aa66f 100644 --- a/src/libs/ssh/sshkeygenerator.cpp +++ b/src/libs/ssh/sshkeygenerator.cpp @@ -83,7 +83,7 @@ bool SshKeyGenerator::generateKeys(KeyType type, PrivateKeyFormat format, int ke generateOpenSslPublicKeyString(key); } return true; - } catch (const Exception &e) { + } catch (const std::exception &e) { m_error = tr("Error generating key: %1").arg(QString::fromLatin1(e.what())); return false; } diff --git a/src/libs/ssh/sshremoteprocess.cpp b/src/libs/ssh/sshremoteprocess.cpp index 2f31b39fbc4..5a875d1f105 100644 --- a/src/libs/ssh/sshremoteprocess.cpp +++ b/src/libs/ssh/sshremoteprocess.cpp @@ -209,7 +209,7 @@ void SshRemoteProcess::sendSignal(Signal signal) QSSH_ASSERT_AND_RETURN(signalString); d->m_sendFacility.sendChannelSignalPacket(d->remoteChannel(), signalString); } - } catch (const Botan::Exception &e) { + } catch (const std::exception &e) { setErrorString(QString::fromLatin1(e.what())); d->closeChannel(); } diff --git a/src/libs/ssh/sshtcpipforwardserver.cpp b/src/libs/ssh/sshtcpipforwardserver.cpp index 89cc2f680c9..5501ea930b9 100644 --- a/src/libs/ssh/sshtcpipforwardserver.cpp +++ b/src/libs/ssh/sshtcpipforwardserver.cpp @@ -86,7 +86,7 @@ void SshTcpIpForwardServer::initialize() emit stateChanged(Initializing); d->m_sendFacility.sendTcpIpForwardPacket(d->m_bindAddress.toUtf8(), d->m_bindPort); d->m_timeoutTimer.start(d->ReplyTimeout); - } catch (const Botan::Exception &e) { + } catch (const std::exception &e) { qCWarning(sshLog, "Botan error: %s", e.what()); d->m_timeoutTimer.stop(); setClosed(); @@ -105,7 +105,7 @@ void SshTcpIpForwardServer::close() d->m_sendFacility.sendCancelTcpIpForwardPacket(d->m_bindAddress.toUtf8(), d->m_bindPort); d->m_timeoutTimer.start(d->ReplyTimeout); - } catch (const Botan::Exception &e) { + } catch (const std::exception &e) { qCWarning(sshLog, "Botan error: %s", e.what()); d->m_timeoutTimer.stop(); setClosed();