Added error code from SQLite into returned value on error

This commit is contained in:
Alexey Romanov
2010-11-23 15:56:30 +03:00
parent 9041a0bb98
commit 2ea2dc8fcc
3 changed files with 28 additions and 26 deletions

View File

@@ -737,10 +737,10 @@ exec(Port, {sql_bind_and_exec, SQL, Params}) ->
wait_result(Port) ->
receive
{Port, error, Reason} ->
{Port, error, Code, Reason} ->
error_logger:error_msg("sqlite3 driver error: ~s~n", [Reason]),
% ?dbg("Error: ~p~n", [Reason]),
{error, Reason};
{error, Code, Reason};
{Port, Reply} ->
% ?dbg("Reply: ~p~n", [Reply]),
Reply;