couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rand...@apache.org
Subject [2/2] git commit: Revert "Receive the correct error message to proceed upon ignoring a file-open error"
Date Wed, 21 Mar 2012 08:47:39 GMT
Revert "Receive the correct error message to proceed upon ignoring a file-open error"

Most of the errors here will be of the form {error, Reason} because
they come from the file module. Instead of minting our own file_exists
atom lets use {error, eexist}.

This reverts commit 3e5ad086c59af9819f2e93d55f10d61f949002d3.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/bb569905
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/bb569905
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/bb569905

Branch: refs/heads/1.2.x
Commit: bb569905aa1781beaf3403c98f4079ea06339451
Parents: 3e5ad08
Author: Randall Leeds <randall@apache.org>
Authored: Wed Mar 21 01:46:08 2012 -0700
Committer: Randall Leeds <randall@apache.org>
Committed: Wed Mar 21 01:46:08 2012 -0700

----------------------------------------------------------------------
 src/couchdb/couch_file.erl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/bb569905/src/couchdb/couch_file.erl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_file.erl b/src/couchdb/couch_file.erl
index 73edde3..7725ddc 100644
--- a/src/couchdb/couch_file.erl
+++ b/src/couchdb/couch_file.erl
@@ -53,14 +53,14 @@ open(Filepath, Options) ->
     ignore ->
         % get the error
         receive
-        {Ref, Pid, Reason} ->
+        {Ref, Pid, {error, Reason} = Error} ->
             case process_info(self(), trap_exit) of
             {trap_exit, true} -> receive {'EXIT', Pid, _} -> ok end;
             {trap_exit, false} -> ok
             end,
             ?LOG_ERROR("Error opening file ~s: ~s",
                 [Filepath, file:format_error(Reason)]),
-            Reason
+            Error
         end;
     Error ->
         % We can't say much here, because it could be any kind of error.


Mime
View raw message