diff options
| author | Ben Hood <0x6e6562@gmail.com> | 2008-12-22 15:28:38 +0000 |
|---|---|---|
| committer | Ben Hood <0x6e6562@gmail.com> | 2008-12-22 15:28:38 +0000 |
| commit | b5987fc4f5faf7a96e8394ff2559945cbc76977d (patch) | |
| tree | d6cd18102818223fb2685904781caada5852b45a /src | |
| parent | 3d763c6edd1f41de98e94c57daa3b0e24eff7348 (diff) | |
| parent | b21c2dafbc4e35fe5c5963ead0f7b9b1419b886e (diff) | |
| download | rabbitmq-server-git-b5987fc4f5faf7a96e8394ff2559945cbc76977d.tar.gz | |
Merged 20047 into default
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_channel.erl | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 5d7fde90ef..07d55d04e6 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -111,20 +111,23 @@ init(ProxyPid, [ReaderPid, WriterPid, Username, VHost]) -> consumer_mapping = dict:new()}. handle_message({method, Method, Content}, State) -> - case (catch handle_method(Method, Content, State)) of - {reply, Reply, NewState} -> - ok = rabbit_writer:send_command(NewState#ch.writer_pid, Reply), - NewState; - {noreply, NewState} -> - NewState; - stop -> - exit(normal); - {'EXIT', {amqp, Error, Explanation, none}} -> + try + case handle_method(Method, Content, State) of + {reply, Reply, NewState} -> + ok = rabbit_writer:send_command(NewState#ch.writer_pid, Reply), + NewState; + {noreply, NewState} -> + NewState; + stop -> + exit(normal) + end + catch + exit:{amqp, Error, Explanation, none} -> terminate({amqp, Error, Explanation, rabbit_misc:method_record_type(Method)}, State); - {'EXIT', Reason} -> - terminate(Reason, State) + _:Reason -> + terminate({Reason, erlang:get_stacktrace()}, State) end; handle_message(terminate, State) -> |
