Sqlite: Throw misuse Exception in SqliteStatement::bind

Change-Id: I014cf7e067bc67c38448bd79a179858c8abb0b5b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Marco Bubke
2018-03-29 18:31:57 +02:00
parent 5e42bbc7fb
commit 071a6f90d3

View File

@@ -293,6 +293,7 @@ void BaseStatement::checkForBindingError(int resultCode) const
case SQLITE_TOOBIG: throwBingingTooBig("SqliteStatement::bind: string or blob are over size limits(SQLITE_LIMIT_LENGTH)!");
case SQLITE_RANGE : throwBindingIndexIsOutOfRange("SqliteStatement::bind: binding index is out of range!");
case SQLITE_NOMEM: throw std::bad_alloc();
case SQLITE_MISUSE: throwStatementIsMisused("SqliteStatement::bind: was called inappropriately!");
}
throwUnknowError("SqliteStatement::bind: unknown error has happened");