couch:start/0 masks failures during startup
-------------------------------------------

                 Key: COUCHDB-1317
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1317
             Project: CouchDB
          Issue Type: Bug
          Components: Database Core
         Environment: Ubuntu, with no erlang-os-mon package installed
            Reporter: Matt Goodall
            Priority: Minor


couch:start/0 ignores the result of application:start/1, masking any errors 
that happen during startup. e.g. I didn't have Erlang's os_mon modules (from 
Ubuntu's erlang-os-mon package) installed which caused current couchdb trunk to 
silently fail to start. The following trivial patch makes it fail immediately:

diff --git a/src/couchdb/couch.erl b/src/couchdb/couch.erl
index 956e948..365416e 100644
--- a/src/couchdb/couch.erl
+++ b/src/couchdb/couch.erl
@@ -15,7 +15,8 @@
 -compile(export_all).
 
 start() ->
-    application:start(couch).
+    ok = application:start(couch),
+    ok.
 
 stop() ->
     application:stop(couch).


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to