Added extra function to return a map with error information

This commit is contained in:
Maas-Maarten Zeeman
2022-05-22 22:19:30 +02:00
parent 71ab29c724
commit 135715bf0a
3 changed files with 61 additions and 2 deletions

View File

@@ -22,6 +22,7 @@
-export([
open/1,
close/1,
error_info/1,
set_update_hook/2,
@@ -89,6 +90,15 @@ open(_Filename) ->
close(_Db) ->
erlang:nif_error(nif_library_not_loaded).
%% @doc Get an error messages for the last occurred error.
%%
-spec error_info(Connection) -> ErrorMsg
when Connection :: esqlite3(),
ErrorMsg :: map().
error_info(_Db) ->
erlang:nif_error(nif_library_not_loaded).
%% @doc Set an update hook
%%
-spec set_update_hook(Connection, Pid) -> Result