couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benoit Chesneau (JIRA)" <j...@apache.org>
Subject [jira] [Created] (COUCHDB-2050) don't throw errors in the core API modules like couch_db
Date Thu, 06 Feb 2014 09:12:09 GMT
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)

Mime
View raw message