Documentation bugs

Matt Reynolds matt@REDACTED
Fri Jun 26 05:26:10 CEST 2009


I'm not sure if these have already been filed, so these might be repeats.

>From : http://erlang.org/doc/design_principles/events.html#4

"This function sends a message to the event manager registered as
error_man, telling it to add the event handler terminal_logger. The
event manager will call the callback function
terminal_logger:init([]), where the argument [] is the third argument
to add_handler. init is expected to return {ok, State}, where State is
the internal state *fo* the event handler."

I think that's either "for" or "of", but fo it is not.

"Here, init does not need any *indata* and ignores its argument. Also,
for terminal_logger the internal state is not used. For file_logger,
the internal state is used to save the open file descriptor.

init(*_Args*) ->
    {ok, Fd} = file:open(File, read),
    {ok, Fd}.
"

* "indata" isn't a word, maybe it meant to be "input arguments/data"?
* "_Args" is the argument for terminal_logger, not file_logger.
"_Args" should be "File" to match the previous code example.

Thanks for all the hard work!


More information about the erlang-bugs mailing list