erlang / otp

Erlang/OTP
http://erlang.org
Apache License 2.0
11.43k stars 2.96k forks source link

EDoc swallows errors when running with -chunks #5778

Open TheGeorge opened 2 years ago

TheGeorge commented 2 years ago

Describe the bug When producing chunks, edoc swallows error messages, and only prints a message, that it failed, but not why.

The issues is here https://github.com/erlang/otp/blob/master/lib/edoc/src/edoc_doclet_chunks.erl#L119-L123

    catch _:_R:_St ->
    ?debug("error: ~p\n"
           "stacktrace:\n~p\n\n", [_R, _St]),
    {OkSet, true}
    end.

and should probably be something like this

    catch throw:{error, Line, {Fmt, Args}}:_St ->
        report(Line, File, Fmt, Args),
    {OkSet, true}
    end.

Expected behavior Error messages are correctly forwarded to be reported.

Affected versions current master

garazdawi commented 2 years ago

Putting this in "help wanted" as #5779 seems to have stalled.