diff options
| author | Francesco Mazzoli <francesco@rabbitmq.com> | 2012-07-12 12:44:31 +0100 |
|---|---|---|
| committer | Francesco Mazzoli <francesco@rabbitmq.com> | 2012-07-12 12:44:31 +0100 |
| commit | 6f2fbcbb753c045bf7bb0320d187dd087c25e4de (patch) | |
| tree | 91dd4c9fc77f6ff108632a75fe51ae3b332c33ae /src | |
| parent | f9f1e48cdd5398737f5b6d5d21fdb5baebb89a98 (diff) | |
| download | rabbitmq-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.erl | 3 |
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; |
