Use std::exception for the login response

This commit is contained in:
Konstantinos Sideris 2017-12-03 02:50:46 +02:00
parent 914bdecc0b
commit 3ea2053b25

View file

@ -111,7 +111,7 @@ MatrixClient::login(const QString &username, const QString &password) noexcept
emit loginSuccess(QString::fromStdString(login.user_id.toString()), emit loginSuccess(QString::fromStdString(login.user_id.toString()),
hostname, hostname,
QString::fromStdString(login.access_token)); QString::fromStdString(login.access_token));
} catch (DeserializationException &e) { } catch (std::exception &e) {
qWarning() << "Malformed JSON response" << e.what(); qWarning() << "Malformed JSON response" << e.what();
emit loginError(tr("Malformed response. Possibly not a Matrix server")); emit loginError(tr("Malformed response. Possibly not a Matrix server"));
} }