Age | Commit message (Collapse) | Author |
|
The gen_fsm, gen_server, and wx_object format_status implementations
fail to handle global names of the form {global, term()} where term()
is something other than an atom, pid, or list. Change these
format_status implementations to treat names that are atoms, pids, or
lists as before, but for all other terms, set the header property of
the function return value to a tuple whose first element is a string
describing the return value and whose second element is the name term.
Add unit tests for gen_server and gen_fsm to verify sys:get_status
calls work successfully for globally registered instances.
|
|
When a gen_server or gen_fsm process terminates abnormally, sometimes
the text representation of the process state can occupy many lines of
the error log, depending on the definition of the state
term. Developers sometimes would like a way to trim out parts of the
state from the log if those parts don't contribute to documenting the
circumstances of the error, thereby helping to reduce the amount of
logged output.
Since the format_status callback can already format and specialize
gen_server and gen_fsm state for inclusion in the term returned from
sys:get_status, this patch extends format_status in a
backward-compatible way to also be able to specialize the state logged
for abnormal gen_server and gen_fsm termination, and includes new unit
tests to verify the new functionality.
This patch also eliminates the previous restriction that the status
returned by format_status must be a list. It can now be any term.
The documentation is extended to cover the new usage for
format_status, and it's been improved to recommend a form for the
normal case that allows the returned status to fit well with the rest
of the term returned by sys:get_status. The documentation is clear
that this form is only recommended, not required.
|
|
* ks/stdlib:
erl_parse.yrl: Add missing operator in type declaration
stdlib: Add types and specs
stdlib: Use fun object instead of {M,F} tuple
ets: Cleanup as suggested by tidier
OTP-8576 ks/stdlib
|
|
|
|
|