25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

Add ability to use additional custom errors when parsing options

This commit is contained in:
Paweł Chmielowski 2024-04-17 14:01:21 +02:00
parent 051bf2968a
commit 0fdf58b1ec

View File

@ -197,6 +197,11 @@ format_error(eimp_error) ->
format("ejabberd is built without image converter support", []);
format_error({mqtt_codec, Reason}) ->
mqtt_codec:format_error(Reason);
format_error({external_module_error, Module, Error}) ->
try Module:format_error(Error)
catch _:_ ->
format("Invalid value", [])
end;
format_error(Reason) ->
yconf:format_error(Reason).