Skip to content

Commit

Permalink
Add debug message in case of failure in QgsSLConnect::sqlite3_close()
Browse files Browse the repository at this point in the history
and in QgsSLConnect::sqlite3_close_v2() too. This can make spotting
issues like the one fixed in b0f2b97
easier.
  • Loading branch information
rouault committed Mar 10, 2016
1 parent b0f2b97 commit b253a29
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/core/qgsslconnect.cpp
Expand Up @@ -14,6 +14,7 @@
***************************************************************************/

#include "qgsslconnect.h"
#include "qgslogger.h"

#include <sqlite3.h>
#include <spatialite.h>
Expand Down Expand Up @@ -52,6 +53,11 @@ int QgsSLConnect::sqlite3_close( sqlite3 *db )
spatialite_cleanup_ex( mSLconns.take( db ) );
#endif

if ( res != SQLITE_OK )
{
QgsDebugMsg( QString( "sqlite3_close() failed: %1" ).arg( res ) );
}

return res;
}

Expand Down Expand Up @@ -85,5 +91,10 @@ int QgsSLConnect::sqlite3_close_v2( sqlite3 *db )
spatialite_cleanup_ex( mSLconns.take( db ) );
#endif

if ( res != SQLITE_OK )
{
QgsDebugMsg( QString( "sqlite3_close() failed: %1" ).arg( res ) );
}

return res;
}

0 comments on commit b253a29

Please sign in to comment.