anchor.diff:  init_and_open() ->
     init(),
     api_version(100),
  -  {ok, DB} = open(),
  -  DB.
  +  maybe_fdb_do([
  +    fun() -> open() end,
  +    fun(DB) -> DB end
  +  ]).
   
   %% @doc Initializes the driver and returns a database handle
   -spec init_and_open(SoFile::list()) -> fdb_database().
  
positive.code: init_and_open(SoFile) ->
    init(SoFile),
    api_version(100),
    {ok, DB} = open(),
    DB.
  
  %% @doc Gets a value using a key or multiple values using a selector
  %%
  
negative.code:   handle_transaction_attempt(CommitResult).
  
  attempt_transaction(DbHandle, DoStuff) ->
    maybe_fdb_do([
    fun() -> fdb_nif:fdb_database_create_transaction(DbHandle) end,
    fun(Tx) -> 
        Result = DoStuff({tx, Tx}),
        ApplySelf = fun() -> attempt_transaction(DbHandle, DoStuff) end,
        CommitF = fdb_nif:fdb_transaction_commit(Tx), 
        {future(CommitF), Tx, Result, ApplySelf}
       end
    ]).
  
  handle_transaction_attempt({ok, _Tx, Result, _ApplySelf}) -> Result;
  handle_transaction_attempt({{error, Err}, Tx, _Result, ApplySelf}) ->
    OnErrorF = fdb_nif:fdb_transaction_on_error(Tx, Err),
    maybe_fdb_do([
      fun () -> future(OnErrorF) end,
      fun () -> ApplySelf() end
    ]).
  
  handle_fdb_result({0, RetVal}) -> {ok, RetVal};
  handle_fdb_result(0) -> ok;
  handle_fdb_result({error, network_already_running}) -> ok;
  