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/08/01 16:29:52 UTC

[12/23] fabric commit: updated refs/heads/windsor-merge to 4ec3f11

Throw errors when starting changes streams

Previously we were calling the user supplied callback on these errors
which caused a badmatch in keep_sending_changes. This just throws the
error and lets chttpd handle formatting it for the user.

BugzId: 26122


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

Branch: refs/heads/windsor-merge
Commit: 6408f7f4e434bee9c55d1a68f037b37d813fa37e
Parents: cee3479
Author: Paul J. Davis <pa...@gmail.com>
Authored: Thu Dec 12 12:45:10 2013 -0600
Committer: Robert Newson <rn...@apache.org>
Committed: Fri Aug 1 15:13:49 2014 +0100

----------------------------------------------------------------------
 src/fabric_view_changes.erl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/6408f7f4/src/fabric_view_changes.erl
----------------------------------------------------------------------
diff --git a/src/fabric_view_changes.erl b/src/fabric_view_changes.erl
index 4b8811b..1af330a 100644
--- a/src/fabric_view_changes.erl
+++ b/src/fabric_view_changes.erl
@@ -174,8 +174,10 @@ send_changes(DbName, ChangesArgs, Callback, PackedSeqs, AccIn, Timeout) ->
                 after
                     fabric_util:cleanup(Workers)
                 end;
+            {error, Reason} ->
+                throw({error, Reason});
             Else ->
-                Callback(Else, AccIn)
+                throw({error, Else})
         end
     after
         rexi_monitor:stop(RexiMon)