Removed 'unexpected return code'; we're using the v2 version of sqlite_prepare

See http://www.sqlite.org/c3ref/step.html; any error code can be returned.
This commit is contained in:
Arjan Scherpenisse
2014-01-19 20:41:54 +01:00
parent f5ca40f8b0
commit 9ca051542d

View File

@@ -20,6 +20,7 @@
#include <erl_nif.h>
#include <string.h>
#include <stdio.h>
#include "queue.h"
#include "sqlite3.h"
@@ -491,12 +492,7 @@ do_step(ErlNifEnv *env, sqlite3 *db, sqlite3_stmt *stmt)
if(rc == SQLITE_BUSY)
return make_atom(env, "$busy");
if(rc == SQLITE_ERROR)
return make_sqlite3_error_tuple(env, rc, db);
if(rc == SQLITE_MISUSE)
return make_error_tuple(env, "misuse");
return make_error_tuple(env, "unexpected_return_value");
return make_sqlite3_error_tuple(env, rc, db);
}
static ERL_NIF_TERM