diff options
| author | Matthias Radestock <matthias@lshift.net> | 2008-10-13 21:37:02 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@lshift.net> | 2008-10-13 21:37:02 +0100 |
| commit | 45090533fe5f06aa6f5f8134a0658e186cf19f1c (patch) | |
| tree | 0462a3c841e2397777d35620a9b5e10bff6ae9d3 /src | |
| parent | 07f212e2942af3f5eb50543e0e36ccda026ac383 (diff) | |
| download | rabbitmq-server-git-45090533fe5f06aa6f5f8134a0658e186cf19f1c.tar.gz | |
exit with a proper protocol error when commit/rollback fail
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_channel.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index a9278898ea..ef3a9f0ebf 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -717,7 +717,8 @@ internal_commit(State = #ch{transaction_id = TxnKey, case rabbit_amqqueue:commit_all(sets:to_list(Participants), TxnKey) of ok -> new_tx(State); - {error, Errors} -> exit({commit_failed, Errors}) + {error, Errors} -> rabbit_misc:protocol_error( + internal_error, "commit failed: ~w", [Errors]) end. internal_rollback(State = #ch{transaction_id = TxnKey, @@ -732,7 +733,8 @@ internal_rollback(State = #ch{transaction_id = TxnKey, TxnKey) of ok -> NewUAMQ = queue:join(UAQ, UAMQ), new_tx(State#ch{unacked_message_q = NewUAMQ}); - {error, Errors} -> exit({rollback_failed, Errors}) + {error, Errors} -> rabbit_misc:protocol_error( + internal_error, "rollback failed: ~w", [Errors]) end. fold_per_queue(F, Acc0, UAQ) -> |
