1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

Bug 2700 - "Failed to open the project database"

Only information gathering changes...not a fix
This commit is contained in:
Leland Lucius
2021-03-27 14:26:30 -05:00
parent 6908d37a90
commit 125114cfe7
3 changed files with 23 additions and 7 deletions

View File

@@ -65,6 +65,10 @@ bool DBConnection::ShouldBypass()
void DBConnection::SetError(
const TranslatableString &msg, const TranslatableString &libraryError)
{
wxLogMessage(wxT("Connection msg: %s"), msg.Debug());
if (!libraryError.empty())
wxLogMessage(wxT("Connection error: %s"), libraryError.Debug());
mpErrors->mLastError = msg;
mpErrors->mLibraryError = libraryError;
}
@@ -73,12 +77,12 @@ void DBConnection::SetDBError(
const TranslatableString &msg, const TranslatableString &libraryError)
{
mpErrors->mLastError = msg;
wxLogDebug(wxT("SQLite error: %s"), mpErrors->mLastError.Debug());
printf(" Lib error: %s", mpErrors->mLastError.Debug().mb_str().data());
wxLogMessage(wxT("SQLite error: %s"), mpErrors->mLastError.Debug());
printf("SQLite error: %s", mpErrors->mLastError.Debug().mb_str().data());
mpErrors->mLibraryError = libraryError.empty()
? Verbatim(sqlite3_errmsg(DB())) : libraryError;
wxLogDebug(wxT(" Lib error: %s"), mpErrors->mLibraryError.Debug());
wxLogMessage(wxT(" Lib error: %s"), mpErrors->mLibraryError.Debug());
printf(" Lib error: %s", mpErrors->mLibraryError.Debug().mb_str().data());
}
@@ -271,7 +275,7 @@ sqlite3_stmt *DBConnection::Prepare(enum StatementID id, const char *sql)
rc = sqlite3_prepare_v3(mDB, sql, -1, SQLITE_PREPARE_PERSISTENT, &stmt, 0);
if (rc != SQLITE_OK)
{
wxLogDebug("prepare error %s", sqlite3_errmsg(mDB));
wxLogMessage("prepare error %s", sqlite3_errmsg(mDB));
THROW_INCONSISTENCY_EXCEPTION;
}