couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chewbra...@apache.org
Subject couch-mrview commit: updated refs/heads/1993-bigcouch-couch-mrview to 5a0d7da
Date Thu, 27 Feb 2014 22:58:50 GMT
Repository: couchdb-couch-mrview
Updated Branches:
  refs/heads/1993-bigcouch-couch-mrview 3015c8554 -> 5a0d7da8f


Update couch_mrview_http:view_cb/2 to handle error messages


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

Branch: refs/heads/1993-bigcouch-couch-mrview
Commit: 5a0d7da8f84be19668f0e30c58393bc0df03db9a
Parents: 3015c85
Author: Russell Branca <chewbranca@apache.org>
Authored: Thu Feb 27 14:59:04 2014 -0800
Committer: Russell Branca <chewbranca@apache.org>
Committed: Thu Feb 27 14:59:04 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/5a0d7da8/src/couch_mrview_http.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_http.erl b/src/couch_mrview_http.erl
index f29a089..39f7a97 100644
--- a/src/couch_mrview_http.erl
+++ b/src/couch_mrview_http.erl
@@ -228,7 +228,10 @@ view_cb(complete, #vacc{resp=Resp}=Acc) ->
             {ok, Acc#vacc{resp=Resp2}};
         _ ->
             {ok, Acc#vacc{resp=Resp1, prepend=",\r\n"}}
-    end.
+    end;
+view_cb({error, Reason}, #vacc{resp=Resp}=Acc) ->
+    {ok, Resp1} = chttpd:send_delayed_error(Resp, Reason),
+    {ok, Acc#vacc{resp=Resp1}}.
 
 
 prepend_val(#vacc{prepend=Prepend}) ->


Mime
View raw message