mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Don't hide 'undef' exceptions during config validation
This commit is contained in:
parent
7ff5f2d3fa
commit
d60d72d7bf
@ -1083,7 +1083,7 @@ validate_opts(#state{opts = Opts} = State, ModOpts) ->
|
||||
[Opt, Error,
|
||||
misc:format_val({yaml, Val})]),
|
||||
erlang:error(invalid_option);
|
||||
_:_ ->
|
||||
_:R when R /= undef ->
|
||||
?ERROR_MSG("Invalid value for "
|
||||
"option '~s': ~s",
|
||||
[Opt, misc:format_val({yaml, Val})]),
|
||||
|
@ -586,7 +586,7 @@ validate_module_opt(Module, Opt, Val) ->
|
||||
catch _:_ -> listen_opt_type(Opt)
|
||||
end,
|
||||
try {Opt, VFun(Val)}
|
||||
catch _:_ ->
|
||||
catch _:R when R /= undef ->
|
||||
?ERROR_MSG("Invalid value of listening option ~s: ~s",
|
||||
[Opt, misc:format_val({yaml, Val})]),
|
||||
erlang:error(badarg)
|
||||
|
@ -620,7 +620,7 @@ validate_opt(Opt, Val, VFun) ->
|
||||
NewVal -> [{Opt, NewVal}]
|
||||
catch {invalid_syntax, Error} ->
|
||||
err_invalid_option(Opt, Val, Error);
|
||||
_:_ ->
|
||||
_:R when R /= undef ->
|
||||
err_invalid_option(Opt, Val)
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user