Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6ED4B923C for ; Wed, 21 Mar 2012 08:47:46 +0000 (UTC) Received: (qmail 16801 invoked by uid 500); 21 Mar 2012 08:47:46 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 16564 invoked by uid 500); 21 Mar 2012 08:47:41 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 16513 invoked by uid 99); 21 Mar 2012 08:47:40 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Mar 2012 08:47:40 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 2B8ED83F1; Wed, 21 Mar 2012 08:47:39 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: randall@apache.org To: commits@couchdb.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [2/2] git commit: Revert "Receive the correct error message to proceed upon ignoring a file-open error" Message-Id: <20120321084740.2B8ED83F1@tyr.zones.apache.org> Date: Wed, 21 Mar 2012 08:47:39 +0000 (UTC) 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 Authored: Wed Mar 21 01:46:08 2012 -0700 Committer: Randall Leeds 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.