Browse Source

Increase debugging

pull/169/head
Duke Leto 4 years ago
parent
commit
8c2b0290e8
  1. 5
      src/rpc.cpp

5
src/rpc.cpp

@ -1110,11 +1110,14 @@ void RPC::refreshPrice() {
QNetworkReply *reply = conn->restclient->get(req);
auto s = Settings::getInstance();
qDebug() << "Requesting price feed data via " << price_feed;
QObject::connect(reply, &QNetworkReply::finished, [=] {
reply->deleteLater();
try {
if (reply->error() != QNetworkReply::NoError) {
qDebug() << "Parsing price feed response";
auto parsed = json::parse(reply->readAll(), nullptr, false);
if (!parsed.is_discarded() && !parsed["error"]["message"].is_null()) {
qDebug() << QString::fromStdString(parsed["error"]["message"]);
@ -1190,7 +1193,7 @@ void RPC::refreshPrice() {
}
} catch (const std::exception& e) {
// If anything at all goes wrong, just set the price to 0 and move on.
qDebug() << QString("Caught something nasty: ") << e.what();
qDebug() << QString("Price feed update failure : ") << e.what();
}
// If nothing, then set the price to 0;

Loading…
Cancel
Save