Compare commits

...

2 Commits

Author SHA1 Message Date
Pratik Mankawde
640428a1d4 Merge branch 'develop' into pratik/Add_checks_db_objects 2025-12-11 16:31:16 +00:00
Pratik Mankawde
0363c12b23 added checks in SQLiteDatabase.cpp 2025-12-11 16:29:59 +00:00

View File

@@ -196,10 +196,16 @@ private:
* @brief checkoutTransaction Checks out and returns node store ledger
* database.
* @return Session to the node store ledger database.
* @throws std::runtime_error if ledger database is not available.
*/
auto
checkoutLedger()
{
if (!lgrdb_)
{
JLOG(j_.fatal()) << "Ledger database is not available";
Throw<std::runtime_error>("Ledger database is not available");
}
return lgrdb_->checkoutDb();
}
@@ -207,10 +213,16 @@ private:
* @brief checkoutTransaction Checks out and returns the node store
* transaction database.
* @return Session to the node store transaction database.
* @throws std::runtime_error if transaction database is not available.
*/
auto
checkoutTransaction()
{
if (!txdb_)
{
JLOG(j_.fatal()) << "Transaction database is not available";
Throw<std::runtime_error>("Transaction database is not available");
}
return txdb_->checkoutDb();
}
};