You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2014/05/01 16:07:09 UTC
[22/23] couch-replicator commit: updated
refs/heads/1843-feature-bigcouch to 4965655
Don't send normal exit as error
Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/commit/9e261d5b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/9e261d5b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/9e261d5b
Branch: refs/heads/1843-feature-bigcouch
Commit: 9e261d5b5a57cc2a90740cdd2b0a56ca259ae329
Parents: 5e2c855
Author: Robert Newson <rn...@apache.org>
Authored: Wed Apr 30 12:23:41 2014 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Wed Apr 30 12:25:19 2014 +0100
----------------------------------------------------------------------
src/couch_replicator_manager.erl | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/9e261d5b/src/couch_replicator_manager.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_manager.erl b/src/couch_replicator_manager.erl
index d1c4abe..eb8b0ae 100644
--- a/src/couch_replicator_manager.erl
+++ b/src/couch_replicator_manager.erl
@@ -665,12 +665,13 @@ save_rep_doc(DbName, Doc) ->
defer_call(Fun) ->
{Pid, Ref} = erlang:spawn_monitor(fun() ->
- try
- exit({exit_ok, Fun()})
+ Res = try
+ Fun()
catch
Type:Reason ->
exit({exit_err, Type, Reason})
- end
+ end,
+ exit({exit_ok, Res})
end),
receive
{'DOWN', Ref, process, Pid, {exit_ok, Resp}} ->