mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Trigger an assert if we get errors that shouldn't ever happen.
This commit is contained in:
@@ -19,6 +19,7 @@ void SqliteDatabase::connect()
|
|||||||
{
|
{
|
||||||
cout << "Can't open database: " << mHost << " " << rc << endl;
|
cout << "Can't open database: " << mHost << " " << rc << endl;
|
||||||
sqlite3_close(mConnection);
|
sqlite3_close(mConnection);
|
||||||
|
assert((rc != SQLITE_BUSY) && (rc != SQLITE_LOCKED));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,6 +59,7 @@ bool SqliteDatabase::executeSQL(const char* sql, bool fail_ok)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
assert((rc != SQLITE_BUSY) && (rc != SQLITE_LOCKED));
|
||||||
mMoreRows = false;
|
mMoreRows = false;
|
||||||
|
|
||||||
if (!fail_ok)
|
if (!fail_ok)
|
||||||
@@ -122,6 +124,7 @@ bool SqliteDatabase::getNextRow()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
assert((rc != SQLITE_BUSY) && (rc != SQLITE_LOCKED));
|
||||||
cout << "SQL Rerror:" << rc << endl;
|
cout << "SQL Rerror:" << rc << endl;
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user