mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor(rawdatabase): Small style refactor
This commit is contained in:
parent
85ee69f008
commit
6c9f77530e
|
@ -541,24 +541,23 @@ void RawDatabase::process()
|
|||
}
|
||||
} while (result == SQLITE_ROW);
|
||||
|
||||
if (result == SQLITE_ERROR)
|
||||
{
|
||||
qWarning() << "Error executing query" << anonymizeQuery(query.query);
|
||||
if (result == SQLITE_DONE)
|
||||
continue;
|
||||
|
||||
QString anonQuery = anonymizeQuery(query.query);
|
||||
switch (result) {
|
||||
case SQLITE_ERROR:
|
||||
qWarning() << "Error executing query" << anonQuery;
|
||||
goto cleanupStatements;
|
||||
}
|
||||
else if (result == SQLITE_MISUSE)
|
||||
{
|
||||
qWarning() << "Misuse executing query" << anonymizeQuery(query.query);
|
||||
case SQLITE_MISUSE:
|
||||
qWarning() << "Misuse executing query" << anonQuery;
|
||||
goto cleanupStatements;
|
||||
}
|
||||
else if (result == SQLITE_CONSTRAINT)
|
||||
{
|
||||
qWarning() << "Constraint error executing query" << anonymizeQuery(query.query);
|
||||
case SQLITE_CONSTRAINT:
|
||||
qWarning() << "Constraint error executing query" << anonQuery;
|
||||
goto cleanupStatements;
|
||||
}
|
||||
else if (result != SQLITE_DONE)
|
||||
{
|
||||
qWarning() << "Unknown error"<<result<<"executing query" << anonymizeQuery(query.query);
|
||||
default:
|
||||
qWarning() << "Unknown error" << result
|
||||
<< "executing query" << anonQuery;
|
||||
goto cleanupStatements;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user