From 8dba87d5b080034d746be3dd190442ab16e7e51d Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Wed, 10 Jun 2020 22:04:58 +0200 Subject: [PATCH] try catch hm --- src/controller.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/controller.cpp b/src/controller.cpp index b727e2c..7ce4c2d 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -965,7 +965,8 @@ void Controller::refreshTransactions() { memo = QString::fromStdString(o["memo"].get()); if (memo.startsWith("{")) { - + try + { QJsonDocument headermemo = QJsonDocument::fromJson(memo.toUtf8()); cid = headermemo["cid"].toString(); @@ -974,7 +975,12 @@ void Controller::refreshTransactions() { chatModel->addCid(txid, cid); chatModel->addHeader(txid, headerbytes); - } + } catch(...) + + { + + } + } bool isNotarized; @@ -1191,7 +1197,8 @@ void Controller::refreshTransactions() { if (!it["memo"].is_null()) { if (memo.startsWith("{")) { - + try + { QJsonDocument headermemo = QJsonDocument::fromJson(memo.toUtf8()); cid = headermemo["cid"].toString(); @@ -1208,6 +1215,10 @@ void Controller::refreshTransactions() { main->addPubkey(requestZaddr, publickey); } + } catch(...) + { + + } } if (chatModel->getCidByTx(txid) != QString("0xdeadbeef")){