Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Consolidate exception catching
Browse files Browse the repository at this point in the history
  • Loading branch information
huangminghuang committed Jan 6, 2021
1 parent 46e1ae0 commit 73963d6
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions plugins/blockvault_client_plugin/postgres_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,8 @@ bool postgres_backend::propose_constructed_block(std::pair<uint32_t, uint32_t> w
w.commit();
return true;
}
} catch (const pqxx::unexpected_rows&) {
} catch (const pqxx::unique_violation&) {
} catch (const pqxx::serialization_failure&) {
} catch (const pqxx::transaction_rollback&) {
}
} catch (const pqxx::sql_error&) {
}

return false;
}
Expand All @@ -113,11 +110,8 @@ bool postgres_backend::append_external_block(uint32_t block_num, uint32_t lib, c
w.commit();
return true;
}
} catch (const pqxx::unexpected_rows&) {
} catch (const pqxx::unique_violation&) {
} catch (const pqxx::serialization_failure&) {
} catch (const pqxx::transaction_rollback&) {
}
} catch (const pqxx::sql_error&) {
}
return false;
}

Expand Down

0 comments on commit 73963d6

Please sign in to comment.