diff options
author | Andreas Baumann <Andreas.Baumann@eurospider.com> | 2010-09-06 15:16:38 +0200 |
---|---|---|
committer | Andreas Baumann <Andreas.Baumann@eurospider.com> | 2010-09-06 15:16:38 +0200 |
commit | f6c143f4c4e4f0a8118596909114e34dfc496b92 (patch) | |
tree | 1a372ef0090360cf80c8d3168ba8e4e619c6b349 /src | |
parent | 23979669900d75bccefb5b4a825882d329a2bd9d (diff) | |
download | sqlitexx-f6c143f4c4e4f0a8118596909114e34dfc496b92.tar.gz sqlitexx-f6c143f4c4e4f0a8118596909114e34dfc496b92.tar.bz2 |
fixed test9, works now
Diffstat (limited to 'src')
-rw-r--r-- | src/except.cpp | 5 | ||||
-rw-r--r-- | src/prepared_statement.cpp | 4 | ||||
-rw-r--r-- | src/result.cpp | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/except.cpp b/src/except.cpp index 9a07334..6b34c69 100644 --- a/src/except.cpp +++ b/src/except.cpp @@ -58,4 +58,9 @@ database_locked::database_locked( ) { } +database_locked::database_locked( const string &_what ) + : failure( _what ) +{ +} + } /* namespace sqlite3xx */ diff --git a/src/prepared_statement.cpp b/src/prepared_statement.cpp index a63a75c..b2308bd 100644 --- a/src/prepared_statement.cpp +++ b/src/prepared_statement.cpp @@ -127,7 +127,7 @@ prepared_stmt::prepared_stmt( sqlite3 *db, string __sql ) : break; case SQLITE_BUSY: - throw database_locked( ); + throw database_locked( "locked in prepared statement" ); default: { @@ -163,7 +163,7 @@ void prepared_stmt::reset( ) { break; case SQLITE_BUSY: - throw database_locked( ); + throw database_locked( "database locked in reset" ); default: { diff --git a/src/result.cpp b/src/result.cpp index 5f989a9..6edd2e7 100644 --- a/src/result.cpp +++ b/src/result.cpp @@ -94,7 +94,7 @@ void result::Step( ) { /* don't fail if the sqlite file is locked by another writer, try again later */ case SQLITE_BUSY: - throw database_locked( ); + throw database_locked( "database locked in step" ); default: { ostringstream s; |