summaryrefslogtreecommitdiff
path: root/src/rabbit_trace.erl
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2011-04-12 10:49:30 +0100
committerSimon MacMullen <simon@rabbitmq.com>2011-04-12 10:49:30 +0100
commitce79d7fc203c13b7c91c85421962a6c741749cf2 (patch)
treea7af84e0df0c39932720dff36ed68c9898afc304 /src/rabbit_trace.erl
parentc78435a840ed2eb8643e683f1b574f3553e8b202 (diff)
downloadrabbitmq-server-ce79d7fc203c13b7c91c85421962a6c741749cf2.tar.gz
Be more specific about what we catch.
Diffstat (limited to 'src/rabbit_trace.erl')
-rw-r--r--src/rabbit_trace.erl16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/rabbit_trace.erl b/src/rabbit_trace.erl
index c39a056c..1e3553cb 100644
--- a/src/rabbit_trace.erl
+++ b/src/rabbit_trace.erl
@@ -68,13 +68,15 @@ tap_trace_out({#resource{name = QName}, _QPid, _QMsgId, Redelivered,
end).
check_trace(XName, VHost, F) ->
- case catch case application:get_env(rabbit, {trace_exchange, VHost}) of
- undefined -> ok;
- {ok, XName} -> ok;
- {ok, TraceExchange} -> F(TraceExchange)
- end of
- {'EXIT', Reason} -> rabbit_log:info("Trace tap died: ~p~n", [Reason]);
- ok -> ok
+ case application:get_env(rabbit, {trace_exchange, VHost}) of
+ undefined -> ok;
+ {ok, XName} -> ok;
+ {ok, TraceX} -> case catch F(TraceX) of
+ {'EXIT', Reason} -> rabbit_log:info(
+ "Trace tap died: ~p~n",
+ [Reason]);
+ ok -> ok
+ end
end.
publish(TraceExchange, VHost, RKPrefix, RKSuffix, Table, Payload) ->