Skip to content

Commit 4450006

Browse files
Use the constant across the board
Part of #1590.
1 parent f5aa1fb commit 4450006

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rabbit_policies.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ validate_policy0(<<"max-length-bytes">>, Value) ->
102102
{error, "~p is not a valid maximum length in bytes", [Value]};
103103

104104
validate_policy0(<<"max-priority">>, Value)
105-
when is_integer(Value), Value >= 0, Value =< 255 ->
105+
when is_integer(Value), Value >= 0, Value =< ?MAX_SUPPORTED_PRIORITY ->
106106
ok;
107107
validate_policy0(<<"max-priority">>, Value) ->
108-
{error, "~p is not a valid max priority (must be an integer in the 1-255 range)", [Value]};
108+
{error, "~p is not a valid max priority (must be an integer in the 1-~p range)", [Value, ?MAX_SUPPORTED_PRIORITY]};
109109

110110
validate_policy0(<<"queue-mode">>, <<"default">>) ->
111111
ok;

0 commit comments

Comments
 (0)