You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/08/20 20:21:28 UTC

[GitHub] [couchdb] nickva commented on a change in pull request #3093: Do not use (catch ...) in couch_views_reader:load_docs/4

nickva commented on a change in pull request #3093:
URL: https://github.com/apache/couchdb/pull/3093#discussion_r474250298



##########
File path: src/couch_views/src/couch_views_reader.erl
##########
@@ -210,8 +210,7 @@ load_doc(TxDb, Id, null, DocOpts) ->
 
 load_doc(TxDb, Id, Rev, DocOpts) ->
     Rev1 = couch_doc:parse_rev(Rev),
-    case (catch fabric2_db:open_doc_revs(TxDb, Id, [Rev1], DocOpts)) of
+    case fabric2_db:open_doc_revs(TxDb, Id, [Rev1], DocOpts) of
         {ok, [{ok, Doc}]} -> couch_doc:to_json_obj(Doc, DocOpts);
-        {ok, [{{not_found, missing}, Rev}]} -> null;
-        {ok, [_Else]} -> null
+        {ok, [{{not_found, missing}, Rev}]} -> null

Review comment:
       Good call




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org