diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2010-12-02 14:01:22 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2010-12-02 14:01:22 +0000 |
| commit | 29f8ae61c36ecaec7cef4f304a9dc7e591c0953f (patch) | |
| tree | acbd210a7ddc390187d6efdf65381a0b7a55f119 | |
| parent | c3476627f15ad4107485fed5bd9ac36d1d22a556 (diff) | |
| download | rabbitmq-server-git-29f8ae61c36ecaec7cef4f304a9dc7e591c0953f.tar.gz | |
Catch all types of exceptions, preserve the stack trace in the event that we have a non-AMQP error.
| -rw-r--r-- | src/rabbit_reader.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index 4dd150a26f..751d412200 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -713,11 +713,12 @@ handle_method0(MethodName, FieldsBin, try handle_method0(Protocol:decode_method_fields(MethodName, FieldsBin), State) - catch exit:Reason -> + catch Type:Reason -> CompleteReason = case Reason of #amqp_error{method = none} -> Reason#amqp_error{method = MethodName}; - OtherReason -> OtherReason + OtherReason -> {Type, OtherReason, + erlang:get_stacktrace()} end, case ?IS_RUNNING(State) of true -> send_exception(State, 0, CompleteReason); |
