mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
Print a distinct warning for SQLITE_PROTOCOL
This commit is contained in:
parent
d05bf04444
commit
7cdefdbe73
1 changed files with 8 additions and 4 deletions
|
@ -49,10 +49,14 @@ static void throwSQLiteError(sqlite3 * db, const format & f)
|
|||
{
|
||||
int err = sqlite3_errcode(db);
|
||||
if (err == SQLITE_BUSY || err == SQLITE_PROTOCOL) {
|
||||
static bool warned = false;
|
||||
if (!warned) {
|
||||
printMsg(lvlError, "warning: SQLite database is busy");
|
||||
warned = true;
|
||||
if (err == SQLITE_PROTOCOL)
|
||||
printMsg(lvlError, "warning: SQLite database is busy (SQLITE_PROTOCOL)");
|
||||
else {
|
||||
static bool warned = false;
|
||||
if (!warned) {
|
||||
printMsg(lvlError, "warning: SQLite database is busy");
|
||||
warned = true;
|
||||
}
|
||||
}
|
||||
/* Sleep for a while since retrying the transaction right away
|
||||
is likely to fail again. */
|
||||
|
|
Loading…
Reference in a new issue