summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_event_sup.erl
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2011-01-07 11:43:46 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2011-01-07 11:43:46 +0000
commitc73a8da174f846e5fa401a25c47cb452f9a8bca6 (patch)
tree75b9293bcfd5c12735597095182c88b82bb98366 /src/couchdb/couch_event_sup.erl
parentb82a37b821b6b943470fcc4476b5530cb48ef4ab (diff)
Merged revision 1056274 from trunk
More explicit and helpful file access permission errors Closes COUCHDB-966 git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1056275 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_event_sup.erl')
-rw-r--r--src/couchdb/couch_event_sup.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/couchdb/couch_event_sup.erl b/src/couchdb/couch_event_sup.erl
index 6fd6963a..07c48790 100644
--- a/src/couchdb/couch_event_sup.erl
+++ b/src/couchdb/couch_event_sup.erl
@@ -50,8 +50,12 @@ stop(Pid) ->
gen_server:cast(Pid, stop).
init({EventMgr, EventHandler, Args}) ->
- ok = gen_event:add_sup_handler(EventMgr, EventHandler, Args),
- {ok, {EventMgr, EventHandler}}.
+ case gen_event:add_sup_handler(EventMgr, EventHandler, Args) of
+ ok ->
+ {ok, {EventMgr, EventHandler}};
+ {stop, Error} ->
+ {stop, Error}
+ end.
terminate(_Reason, _State) ->
ok.