diff options
Diffstat (limited to 'src')
| -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 81c17fbfbe..1b6178c1f4 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). |
