diff options
author | Alvaro Videla <alvaro@rabbitmq.com> | 2014-04-21 09:49:01 +0200 |
---|---|---|
committer | Alvaro Videla <alvaro@rabbitmq.com> | 2014-04-21 09:49:01 +0200 |
commit | 942f5c4284039338edb73a24fe878e0e3f9ecdff (patch) | |
tree | ce4767ef9bbf8a4c72752c51c4ac58b8f98d97d2 | |
parent | 59ae4f06464e2d6dc935e69082d0422745797c27 (diff) | |
download | rabbitmq-server-942f5c4284039338edb73a24fe878e0e3f9ecdff.tar.gz |
internal_error -> precondition_failed
-rw-r--r-- | src/rabbit_channel_interceptor.erl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rabbit_channel_interceptor.erl b/src/rabbit_channel_interceptor.erl index 81c17fbf..1b6178c1 100644 --- a/src/rabbit_channel_interceptor.erl +++ b/src/rabbit_channel_interceptor.erl @@ -68,17 +68,17 @@ intercept_method(M, VHost, [I]) -> true -> M2; _ -> - internal_error("Interceptor: ~p expected " + precondition_failed("Interceptor: ~p expected " "to return method: ~p but returned: ~p", [I, rabbit_misc:method_record_type(M), rabbit_misc:method_record_type(M2)]) end; {error, Reason} -> - internal_error("Interceptor: ~p failed with reason: ~p", + precondition_failed("Interceptor: ~p failed with reason: ~p", [I, Reason]) end; intercept_method(M, _VHost, Is) -> - internal_error("More than one interceptor for method: ~p -- ~p", + precondition_failed("More than one interceptor for method: ~p -- ~p", [rabbit_misc:method_record_type(M), Is]). %% select the interceptors that apply to intercept_method(). @@ -91,6 +91,6 @@ validate_method(M, M2) -> rabbit_misc:method_record_type(M) =:= rabbit_misc:method_record_type(M2). %% keep dialyzer happy --spec internal_error(string(), [any()]) -> no_return(). -internal_error(Format, Args) -> - rabbit_misc:protocol_error(internal_error, Format, Args). +-spec precondition_failed(string(), [any()]) -> no_return(). +precondition_failed(Format, Args) -> + rabbit_misc:protocol_error(precondition_failed, Format, Args). |