Skip to content

Commit d261ed5

Browse files
rouaultnyalldawson
authored andcommitted
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)
1 parent 0626467 commit d261ed5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/core/qgsslconnect.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
***************************************************************************/
1515

1616
#include "qgsslconnect.h"
17+
#include "qgslogger.h"
1718

1819
#include <sqlite3.h>
1920
#include <spatialite.h>
@@ -52,6 +53,11 @@ int QgsSLConnect::sqlite3_close( sqlite3 *db )
5253
spatialite_cleanup_ex( mSLconns.take( db ) );
5354
#endif
5455

56+
if ( res != SQLITE_OK )
57+
{
58+
QgsDebugMsg( QString( "sqlite3_close() failed: %1" ).arg( res ) );
59+
}
60+
5561
return res;
5662
}
5763

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

94+
if ( res != SQLITE_OK )
95+
{
96+
QgsDebugMsg( QString( "sqlite3_close() failed: %1" ).arg( res ) );
97+
}
98+
8899
return res;
89100
}

0 commit comments

Comments
 (0)