couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [1/2] couch commit: updated refs/heads/master to f7348cb
Date Sat, 27 Feb 2016 17:53:16 GMT
Repository: couchdb-couch
Updated Branches:
  refs/heads/master 30348e6aa -> f7348cbd9


Throw errors from open_ddoc instead of failing on badmatch error.


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

Branch: refs/heads/master
Commit: 4267b0eb19a0b36f67aeca5a841156ddd9df9c2e
Parents: 30348e6
Author: Nick Vatamaniuc <vatamane@gmail.com>
Authored: Fri Feb 26 18:07:51 2016 -0500
Committer: Nick Vatamaniuc <vatamane@gmail.com>
Committed: Fri Feb 26 18:07:51 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/4267b0eb/src/couch_changes.erl
----------------------------------------------------------------------
diff --git a/src/couch_changes.erl b/src/couch_changes.erl
index 7d5cf6e..29c2269 100644
--- a/src/couch_changes.erl
+++ b/src/couch_changes.erl
@@ -343,7 +343,10 @@ check_docids(_) ->
 
 
 open_ddoc(#db{name=DbName, id_tree=undefined}, DDocId) ->
-    {ok, _DDoc} = ddoc_cache:open_doc(mem3:dbname(DbName), DDocId);
+    case ddoc_cache:open_doc(mem3:dbname(DbName), DDocId) of
+        {ok, _} = Resp -> Resp;
+        Else -> throw(Else)
+    end;
 open_ddoc(Db, DDocId) ->
     case couch_db:open_doc(Db, DDocId, [ejson_body]) of
         {ok, _} = Resp -> Resp;


Mime
View raw message