summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmile Joubert <emile@rabbitmq.com>2010-06-21 10:47:37 +0100
committerEmile Joubert <emile@rabbitmq.com>2010-06-21 10:47:37 +0100
commit4c7af7a53d114a477917b3c7a572bf31ad57ca79 (patch)
treea286a6bdc102151bee23303823093a2f350c8e14
parente681131c791dd8beb1514faed04d89b2bb1cf146 (diff)
downloadrabbitmq-server-4c7af7a53d114a477917b3c7a572bf31ad57ca79.tar.gz
Make use of 0.9.1 error constants
-rw-r--r--src/rabbit_channel.erl11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 1ab34f86..cedadf04 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -447,13 +447,9 @@ handle_method(#'basic.publish'{exchange = ExchangeNameBin,
routed ->
ok;
unroutable ->
- %% FIXME: 312 should be replaced by the ?NO_ROUTE
- %% definition, when we move to >=0-9
- ok = basic_return(Message, WriterPid, 312, <<"unroutable">>);
+ ok = basic_return(Message, WriterPid, no_route);
not_delivered ->
- %% FIXME: 313 should be replaced by the ?NO_CONSUMERS
- %% definition, when we move to >=0-9
- ok = basic_return(Message, WriterPid, 313, <<"not_delivered">>)
+ ok = basic_return(Message, WriterPid, no_consumers)
end,
{noreply, case TxnKey of
none -> State;
@@ -946,7 +942,8 @@ binding_action(Fun, ExchangeNameBin, QueueNameBin, RoutingKey, Arguments,
basic_return(#basic_message{exchange_name = ExchangeName,
routing_key = RoutingKey,
content = Content},
- WriterPid, ReplyCode, ReplyText) ->
+ WriterPid, Reason) ->
+ {_Close, ReplyCode, ReplyText} = rabbit_framing:lookup_amqp_exception(Reason),
ok = rabbit_writer:send_command(
WriterPid,
#'basic.return'{reply_code = ReplyCode,