diff options
author | Emile Joubert <emile@rabbitmq.com> | 2011-02-04 14:18:19 +0000 |
---|---|---|
committer | Emile Joubert <emile@rabbitmq.com> | 2011-02-04 14:18:19 +0000 |
commit | 5ecfe82f4886dee81d6de41e2811b6ab46c0297c (patch) | |
tree | 408cd140a62e36516aa78a15f19a82dc3d58f6d2 /src/rabbit_event.erl | |
parent | 1976ccc3c21412f449787b9a04f63d72b90119ba (diff) | |
download | rabbitmq-server-5ecfe82f4886dee81d6de41e2811b6ab46c0297c.tar.gz |
Remove redundant try/catch from event notifierbug23076
Diffstat (limited to 'src/rabbit_event.erl')
-rw-r--r-- | src/rabbit_event.erl | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/rabbit_event.erl b/src/rabbit_event.erl index 40ade4b7..40651d36 100644 --- a/src/rabbit_event.erl +++ b/src/rabbit_event.erl @@ -130,15 +130,8 @@ notify_if(true, Type, Props) -> notify(Type, Props); notify_if(false, _Type, _Props) -> ok. notify(Type, Props) -> - try - %% TODO: switch to os:timestamp() when we drop support for - %% Erlang/OTP < R13B01 - gen_event:notify(rabbit_event, #event{type = Type, - props = Props, - timestamp = now()}) - catch error:badarg -> - %% badarg means rabbit_event is no longer registered. We never - %% unregister it so the great likelihood is that we're shutting - %% down the broker but some events were backed up. Ignore it. - ok - end. + %% TODO: switch to os:timestamp() when we drop support for + %% Erlang/OTP < R13B01 + gen_event:notify(rabbit_event, #event{type = Type, + props = Props, + timestamp = now()}). |