diff options
| author | Daniil Fedotov <dfedotov@pivotal.io> | 2016-04-13 18:20:19 +0100 |
|---|---|---|
| committer | Daniil Fedotov <dfedotov@pivotal.io> | 2016-04-13 18:20:19 +0100 |
| commit | e6a555e438adc6b5106f5cab3d56a208569e768a (patch) | |
| tree | f62ecde18685a3f0247e3db7300e59a7920090b8 /src | |
| parent | d37a278ffb865048e5bbf843495d928efb49439a (diff) | |
| parent | b943c0d1677a42e1763d71159b7b84d519ad3cf2 (diff) | |
| download | rabbitmq-server-git-e6a555e438adc6b5106f5cab3d56a208569e768a.tar.gz | |
Merge branch 'stable'
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_control_main.erl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/rabbit_control_main.erl b/src/rabbit_control_main.erl index 6f99ec903c..7f653c3780 100644 --- a/src/rabbit_control_main.erl +++ b/src/rabbit_control_main.erl @@ -505,9 +505,15 @@ action(set_policy, Node, [Key, Pattern, Defn], Opts, Inform) -> PriorityArg = proplists:get_value(?PRIORITY_OPT, Opts), ApplyToArg = list_to_binary(proplists:get_value(?APPLY_TO_OPT, Opts)), Inform(Msg, [Key, Pattern, Defn, PriorityArg]), - rpc_call( + Res = rpc_call( Node, rabbit_policy, parse_set, - [VHostArg, list_to_binary(Key), Pattern, Defn, PriorityArg, ApplyToArg]); + [VHostArg, list_to_binary(Key), Pattern, Defn, PriorityArg, ApplyToArg]), + case Res of + {error, Format, Args} when is_list(Format) andalso is_list(Args) -> + {error_string, rabbit_misc:format(Format, Args)}; + _ -> + Res + end; action(clear_policy, Node, [Key], Opts, Inform) -> VHostArg = list_to_binary(proplists:get_value(?VHOST_OPT, Opts)), |
