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 | 9f7effa36d1efbc58c9e0785686f17e80f08ea85 (patch) | |
| tree | ce4767ef9bbf8a4c72752c51c4ac58b8f98d97d2 | |
| parent | d59cae70c95cb90e9d59b8ebb1d9ea2a9d474213 (diff) | |
| download | rabbitmq-server-git-9f7effa36d1efbc58c9e0785686f17e80f08ea85.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 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). |
