summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2010-06-10 18:13:45 +0100
committerSimon MacMullen <simon@rabbitmq.com>2010-06-10 18:13:45 +0100
commit140d75a1c239d4243d339dd19838fa84a3c1feb9 (patch)
tree00f60eff2151d251c47123af5f3289222912f7b5
parent645dc7ab95d7f9da6bc2ff750b9945f2242caa83 (diff)
downloadrabbitmq-server-bug22848.tar.gz
Use precondition_failed for equivalence failure.bug22848
-rw-r--r--src/rabbit_channel.erl2
-rw-r--r--src/rabbit_exchange.erl4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 1af07793..d21e0c4a 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -750,7 +750,7 @@ handle_method(#'queue.declare'{queue = QueueNameBin,
%% non-equivalence trumps exclusivity arbitrarily
(#amqqueue{name = QueueName}) ->
rabbit_misc:protocol_error(
- channel_error,
+ precondition_failed,
"parameters for ~s not equivalent",
[rabbit_misc:rs(QueueName)])
end,
diff --git a/src/rabbit_exchange.erl b/src/rabbit_exchange.erl
index d5d69ca4..c5149b08 100644
--- a/src/rabbit_exchange.erl
+++ b/src/rabbit_exchange.erl
@@ -198,7 +198,7 @@ assert_equivalence(X = #exchange{ durable = Durable,
assert_equivalence(#exchange{ name = Name }, _Type, _Durable, _AutoDelete,
_Args) ->
rabbit_misc:protocol_error(
- not_allowed,
+ precondition_failed,
"cannot redeclare ~s with different type, durable or autodelete value",
[rabbit_misc:rs(Name)]).
@@ -215,7 +215,7 @@ assert_args_equivalence(#exchange{ name = Name,
Ae2 = alternate_exchange_value(Args),
if Ae1==Ae2 -> ok;
true -> rabbit_misc:protocol_error(
- not_allowed,
+ precondition_failed,
"cannot redeclare ~s with inequivalent args",
[rabbit_misc:rs(Name)])
end.