summaryrefslogtreecommitdiff
path: root/src/result.cpp
diff options
context:
space:
mode:
authorAndreas Baumann <Andreas.Baumann@eurospider.com>2010-09-06 10:53:02 +0200
committerAndreas Baumann <Andreas.Baumann@eurospider.com>2010-09-06 10:53:02 +0200
commit1dcc640c490a6619eeba19a6bdb93c4ac8d5a6fc (patch)
treefa6db7059152ef1f34ed925b39c92d068812cb75 /src/result.cpp
parent73a0556dca6ff98da2a77a34e75c5eec5969cd87 (diff)
downloadsqlitexx-1dcc640c490a6619eeba19a6bdb93c4ac8d5a6fc.tar.gz
sqlitexx-1dcc640c490a6619eeba19a6bdb93c4ac8d5a6fc.tar.bz2
more cleanup in exceptions, added a database_locked exception,
now we must fix the code to throw this exception all the time and not do funny sleeps in the middle of the sqlitexx layer!
Diffstat (limited to 'src/result.cpp')
-rw-r--r--src/result.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/result.cpp b/src/result.cpp
index f855a0a..5f989a9 100644
--- a/src/result.cpp
+++ b/src/result.cpp
@@ -74,7 +74,6 @@ ostream& operator<<( ostream& o, const result::field& f ) {
void result::Step( ) {
int rc;
-TRY_AGAIN_STEP:
rc = sqlite3_step( _stmt );
switch( rc ) {
case SQLITE_DONE:
@@ -95,8 +94,7 @@ TRY_AGAIN_STEP:
/* don't fail if the sqlite file is locked by another writer, try again later */
case SQLITE_BUSY:
-// sqlitexx_port_sleep( 1 );
- goto TRY_AGAIN_STEP;
+ throw database_locked( );
default: {
ostringstream s;