Improve some error log messages
This commit is contained in:
parent
ebb97bec44
commit
1f21f64d5f
|
@ -606,6 +606,11 @@ validate_module_option(Module, Opt, Val) ->
|
||||||
[Opt, Val]),
|
[Opt, Val]),
|
||||||
error
|
error
|
||||||
end;
|
end;
|
||||||
|
[] ->
|
||||||
|
?ERROR_MSG("unknown listen option '~s' for '~s' will be likely "
|
||||||
|
"ignored because the listening module doesn't have "
|
||||||
|
"any options", [Opt, Module]),
|
||||||
|
{ok, Val};
|
||||||
KnownOpts when is_list(KnownOpts) ->
|
KnownOpts when is_list(KnownOpts) ->
|
||||||
?ERROR_MSG("unknown listen option '~s' for '~s' will be likely "
|
?ERROR_MSG("unknown listen option '~s' for '~s' will be likely "
|
||||||
"ignored, available options are: ~s",
|
"ignored, available options are: ~s",
|
||||||
|
|
|
@ -526,11 +526,19 @@ validate_opts(Host, Module, Opts, Validators) when is_list(Opts) ->
|
||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
false ->
|
false ->
|
||||||
?ERROR_MSG("unknown option '~s' for module '~s' will be"
|
case Validators of
|
||||||
" likely ignored, available options are: ~s",
|
[] ->
|
||||||
[Opt, Module,
|
?ERROR_MSG("unknown option '~s' for module '~s' "
|
||||||
misc:join_atoms([K || {K, _} <- Validators],
|
"will be likely ignored because the "
|
||||||
<<", ">>)]),
|
"module doesn't have any options",
|
||||||
|
[Opt, Module]);
|
||||||
|
_ ->
|
||||||
|
?ERROR_MSG("unknown option '~s' for module '~s' will be"
|
||||||
|
" likely ignored, available options are: ~s",
|
||||||
|
[Opt, Module,
|
||||||
|
misc:join_atoms([K || {K, _} <- Validators],
|
||||||
|
<<", ">>)])
|
||||||
|
end,
|
||||||
[{Opt, Val}]
|
[{Opt, Val}]
|
||||||
end;
|
end;
|
||||||
(_) ->
|
(_) ->
|
||||||
|
|
Loading…
Reference in New Issue