couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [4/5] couch-replicator commit: updated refs/heads/pu to 4965655
Date Thu, 01 May 2014 11:40:47 GMT
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/pu
Commit: 9e261d5b5a57cc2a90740cdd2b0a56ca259ae329
Parents: 5e2c855
Author: Robert Newson <rnewson@apache.org>
Authored: Wed Apr 30 12:23:41 2014 +0100
Committer: Robert Newson <rnewson@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}} ->


Mime
View raw message