diff options
author | Nick Vatamaniuc <vatamane@apache.org> | 2020-08-20 15:36:38 -0400 |
---|---|---|
committer | Nick Vatamaniuc <nickva@users.noreply.github.com> | 2020-08-20 16:26:53 -0400 |
commit | 452ce75350de652a462a9c633844cfb37672fda1 (patch) | |
tree | fc918df436a5cef1a4de4f4b26eee64afe5c25c2 | |
parent | 1c0c9f40225668a67e73d11583c7bd22c042d1f2 (diff) | |
download | couchdb-452ce75350de652a462a9c633844cfb37672fda1.tar.gz |
Do not use (catch ...) in couch_views_reader:load_docs/4
Any error there would just be generating a case clause.
Remove the `{not_found, missing}` clause since it was accidentally matching on
the Rev string and the case was included in the `_Else` clause anyway.
-rw-r--r-- | src/couch_views/src/couch_views_reader.erl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/couch_views/src/couch_views_reader.erl b/src/couch_views/src/couch_views_reader.erl index ce7f16354..61a78d7f8 100644 --- a/src/couch_views/src/couch_views_reader.erl +++ b/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 end. |