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:
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include <erl_nif.h>
|
#include <erl_nif.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
#include "sqlite3.h"
|
#include "sqlite3.h"
|
||||||
@@ -491,12 +492,7 @@ do_step(ErlNifEnv *env, sqlite3 *db, sqlite3_stmt *stmt)
|
|||||||
if(rc == SQLITE_BUSY)
|
if(rc == SQLITE_BUSY)
|
||||||
return make_atom(env, "$busy");
|
return make_atom(env, "$busy");
|
||||||
|
|
||||||
if(rc == SQLITE_ERROR)
|
return make_sqlite3_error_tuple(env, rc, db);
|
||||||
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");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ERL_NIF_TERM
|
static ERL_NIF_TERM
|
||||||
|
|||||||
Reference in New Issue
Block a user