Sqlite: Add exception if statement is called outside of a lock

Sometimes it is really hard to trace if sqlite statement is called
outside of a database connection lock. So we know throw an exception
in the unit test. So we get failing tests.

Change-Id: I71485b9473075751a2fb771ce7e2954e28d8413e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Marco Bubke
2021-04-29 18:02:31 +02:00
parent 943c31a5b4
commit 5fda083436
14 changed files with 179 additions and 172 deletions

View File

@@ -410,4 +410,12 @@ public:
{}
};
class DatabaseIsNotLocked : public Exception
{
public:
DatabaseIsNotLocked(const char *whatErrorHasHappen)
: Exception(whatErrorHasHappen)
{}
};
} // namespace Sqlite