anchor.diff:                      transaction(Fun, R);
   
                   _ : Reason ->
  +                    error_logger:info_msg("function threw non-lock error - ~p", [Reason]),
                       ok = txn_abort(),
                       {error, {transaction_failed, Reason}}
               end;
  
positive.code:     {ok, db_value()} | db_txn_error().
  
  transaction(_Fun, 0, _Opts) ->
      ok = txn_abort(),
      {error, {transaction_failed, retry_limit_reached}};
  transaction(Fun, Retries, Opts) ->
      case txn_begin(Opts) of
          ok ->
              try Fun() of
                  abort ->
                      ok = txn_abort(),
                      {error, transaction_aborted};
  
  
negative.code:         ok ->
              receive
                  ok -> ok;
                  {error, no_txn} -> ok;
                  {error, Reason} -> {error, decode_rc(Reason)}
              end;
  
  