Skip to content

Commit

Permalink
Add extra logging for SQLITE_CANTOPEN errors #5633
Browse files Browse the repository at this point in the history
  • Loading branch information
ckamm committed Jun 6, 2017
1 parent cc5fe55 commit 05c1dce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libsync/ownsql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ bool SqlDatabase::openHelper(const QString &filename, int sqliteFlags)

if (_errId != SQLITE_OK) {
qCWarning(lcSql) << "Error:" << _error << "for" << filename;
if (_errId == SQLITE_CANTOPEN) {
qCWarning(lcSql) << "CANTOPEN extended errcode: " << sqlite3_extended_errcode(_db);
qCWarning(lcSql) << "CANTOPEN system errno: " << sqlite3_system_errno(_db);
}
close();
return false;
}
Expand Down

0 comments on commit 05c1dce

Please sign in to comment.