mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
When convertion of xmlrpc argument to type fails, report it as error
This commit is contained in:
parent
a9b456ccb3
commit
1b5c50a384
@ -373,6 +373,10 @@ try_do_command(AccessCommands, Auth, Command, AttrL,
|
||||
"The call provided additional unused "
|
||||
"arguments:~n~p",
|
||||
[ExitAtL]);
|
||||
exit:{invalid_arg_type, Arg, Type} ->
|
||||
build_fault_response(-122,
|
||||
"Parameter '~p' can't be coerced to type '~p'",
|
||||
[Arg, Type]);
|
||||
Why ->
|
||||
build_fault_response(-118,
|
||||
"A problem '~p' occurred executing the "
|
||||
@ -472,7 +476,7 @@ format_arg(undefined, binary) -> <<>>;
|
||||
format_arg(undefined, string) -> "";
|
||||
format_arg(Arg, Format) ->
|
||||
?ERROR_MSG("don't know how to format Arg ~p for format ~p", [Arg, Format]),
|
||||
throw({error_formatting_argument, Arg, Format}).
|
||||
exit({invalid_arg_type, Arg, Format}).
|
||||
|
||||
process_unicode_codepoints(Str) ->
|
||||
iolist_to_binary(lists:map(fun(X) when X > 255 -> unicode:characters_to_binary([X]);
|
||||
|
Loading…
Reference in New Issue
Block a user