summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFrancesco Mazzoli <francesco@rabbitmq.com>2012-07-12 12:44:31 +0100
committerFrancesco Mazzoli <francesco@rabbitmq.com>2012-07-12 12:44:31 +0100
commit6f2fbcbb753c045bf7bb0320d187dd087c25e4de (patch)
tree91dd4c9fc77f6ff108632a75fe51ae3b332c33ae /src
parentf9f1e48cdd5398737f5b6d5d21fdb5baebb89a98 (diff)
downloadrabbitmq-server-git-6f2fbcbb753c045bf7bb0320d187dd087c25e4de.tar.gz
add comment clarifying the need to pattern match in `with_exit_handler/2'
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_misc.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rabbit_misc.erl b/src/rabbit_misc.erl
index 49b467166b..6ce1d06848 100644
--- a/src/rabbit_misc.erl
+++ b/src/rabbit_misc.erl
@@ -421,6 +421,9 @@ throw_on_error(E, Thunk) ->
Res -> Res
end.
+%% Note the code duplication between this and `with_exit_handler/2' below - we
+%% can't use arbitrary functions in guards, and we can't re-throw runtime
+%% errors.
is_benign_exit({R, _}) when R =:= noproc; R =:= nodedown; R =:= normal;
R =:= shutdown ->
true;