You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Benoit Chesneau (JIRA)" <ji...@apache.org> on 2014/02/06 10:12:09 UTC
[jira] [Created] (COUCHDB-2050) don't throw errors in the core API
modules like couch_db
Benoit Chesneau created COUCHDB-2050:
----------------------------------------
Summary: don't throw errors in the core API modules like couch_db
Key: COUCHDB-2050
URL: https://issues.apache.org/jira/browse/COUCHDB-2050
Project: CouchDB
Issue Type: Improvement
Security Level: public (Regular issues)
Components: Database Core
Reporter: Benoit Chesneau
If we look at the code of {{couch_db:open/2}} for example, we are catching error in it and rethrowing them. Where a more convenient pattern would be to return {ok, db} | {error, Error} .
While throwing easier makes catching Error in the HTTP layer currently, it force us to catch calls in other cases when you are working for example to an Erlang module.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)