25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Handle case that module exports mod_doc, but nothing in it

This commit is contained in:
Badlop 2022-09-30 19:05:04 +02:00
parent 77dacf92d2
commit 77f9254f45

View File

@ -48,7 +48,10 @@ man(Lang) ->
{[{M, Descr, DocOpts, #{example => Example}}|Mods], SubMods}; {[{M, Descr, DocOpts, #{example => Example}}|Mods], SubMods};
#{opts := DocOpts} -> #{opts := DocOpts} ->
{ParentMod, Backend} = strip_backend_suffix(M), {ParentMod, Backend} = strip_backend_suffix(M),
{Mods, dict:append(ParentMod, {M, Backend, DocOpts}, SubMods)} {Mods, dict:append(ParentMod, {M, Backend, DocOpts}, SubMods)};
#{} ->
warn("module ~s is not properly documented", [M]),
Acc
catch _:undef -> catch _:undef ->
case erlang:function_exported( case erlang:function_exported(
M, mod_options, 1) of M, mod_options, 1) of