From 84192ecd19452baeae35c181485d410b3a4be7ac Mon Sep 17 00:00:00 2001 From: Jeremy Rand Date: Thu, 5 Jan 2023 12:54:00 +0000 Subject: [PATCH] Namecoin / Qt: Merge adjacent try/catch clauses --- src/qt/nametablemodel.cpp | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/qt/nametablemodel.cpp b/src/qt/nametablemodel.cpp index a5d2474d9e..d0f62b5ff9 100644 --- a/src/qt/nametablemodel.cpp +++ b/src/qt/nametablemodel.cpp @@ -109,19 +109,13 @@ class NameTablePriv const std::string hexName = maybeName.get_str(); std::string name; - try - { - name = NameTableModel::hexToAscii(QString::fromStdString(hexName)).toStdString(); - } - catch (const InvalidNameString& exc) - { - continue; - } const std::string hexData = maybeData.get_str(); std::string data; + try { + name = NameTableModel::hexToAscii(QString::fromStdString(hexName)).toStdString(); data = NameTableModel::hexToAscii(QString::fromStdString(hexData)).toStdString(); } catch (const InvalidNameString& exc) @@ -180,19 +174,13 @@ class NameTablePriv const std::string hexName = maybeName.get_str(); std::string name; - try - { - name = NameTableModel::hexToAscii(QString::fromStdString(hexName)).toStdString(); - } - catch (const InvalidNameString& exc) - { - continue; - } const std::string hexData = maybeData.get_str(); std::string data; + try { + name = NameTableModel::hexToAscii(QString::fromStdString(hexName)).toStdString(); data = NameTableModel::hexToAscii(QString::fromStdString(hexData)).toStdString(); } catch (const InvalidNameString& exc)