Skip to content
Permalink
Browse files

Add debug message in case of failure in QgsSLConnect::sqlite3_close()

and in QgsSLConnect::sqlite3_close_v2() too. This can make spotting
issues like the one fixed in b0f2b97
easier.

(cherry-picked from b253a29)
  • Loading branch information
rouault authored and nyalldawson committed Mar 12, 2016
1 parent 0626467 commit d261ed573c732f25d3254632cdbf0717c5cdc33c
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/core/qgsslconnect.cpp
@@ -14,6 +14,7 @@
***************************************************************************/

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

#include <sqlite3.h>
#include <spatialite.h>
@@ -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;
}

@@ -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 d261ed5

Please sign in to comment.
You can’t perform that action at this time.