Tags: cireric/vimerl
Tags
Catch when EDoc exits on error
This happens when EDoc tries to analyze a module where the spec
declarations are not exactly above the functions they describe. This is
an example with the module `ssl' which causes these kind of troubles:
---8<-- ssl.erl ------------------------------------------------------------------
-spec start() -> ok | {error, reason()}.
-spec start(permanent | transient | temporary) -> ok | {error, reason()}.
start() ->
application:start(crypto),
application:start(public_key),
application:start(ssl).
start(Type) ->
application:start(crypto, Type),
application:start(public_key, Type),
application:start(ssl, Type).
---8<--------------------------------------------------------------------
With this solution, an error is shown, but at least the module_info/1
function is used to give the rest of the module's exported functions.
PreviousNext