diff options
| author | Emile Joubert <emile@rabbitmq.com> | 2010-06-21 10:47:37 +0100 |
|---|---|---|
| committer | Emile Joubert <emile@rabbitmq.com> | 2010-06-21 10:47:37 +0100 |
| commit | 04b880f1712502c8b4a4383ff4f7b05d2f5ffa2b (patch) | |
| tree | a286a6bdc102151bee23303823093a2f350c8e14 | |
| parent | d4251f5c0014be4a268bef5eab98f924305f85b3 (diff) | |
| download | rabbitmq-server-git-04b880f1712502c8b4a4383ff4f7b05d2f5ffa2b.tar.gz | |
Make use of 0.9.1 error constants
| -rw-r--r-- | src/rabbit_channel.erl | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 1ab34f8653..cedadf0429 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, |
