You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2014/08/01 11:10:04 UTC

[08/35] git commit: Make sure and exit with the reason given

Make sure and exit with the reason given


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-event/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-event/commit/8f63a783
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-event/tree/8f63a783
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-event/diff/8f63a783

Branch: refs/heads/windsor-merge
Commit: 8f63a7839f32906335529ade04add975cb49da66
Parents: a280611
Author: Paul J. Davis <pa...@gmail.com>
Authored: Tue Apr 23 15:41:44 2013 -0500
Committer: Robert Newson <rn...@apache.org>
Committed: Wed Jul 30 17:36:27 2014 +0100

----------------------------------------------------------------------
 src/couch_event_listener.erl | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-event/blob/8f63a783/src/couch_event_listener.erl
----------------------------------------------------------------------
diff --git a/src/couch_event_listener.erl b/src/couch_event_listener.erl
index 7c942bd..94bb133 100644
--- a/src/couch_event_listener.erl
+++ b/src/couch_event_listener.erl
@@ -183,12 +183,13 @@ do_terminate(Reason, #st{module=Module, state=State}) ->
     % indefinitely.
     catch Module:terminate(Reason, State),
     catch couch_event:unregister_all(self()),
-    case Reason of
-        normal -> ok;
-        shutdown -> ok;
-        ignore -> ok;
-        Else -> erlang:error(Else)
-    end.
+    Status = case Reason of
+        normal -> normal;
+        shutdown -> normal;
+        ignore -> normal;
+        Else -> Else
+    end,
+    erlang:exit(Status).
 
 
 where({global, Name}) -> global:safe_whereis_name(Name);