-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugIssue is reported as a bugIssue is reported as a bugpriority:mediumteam:PSAssigned to OTP team PSAssigned to OTP team PS
Milestone
Description
Describe the bug
Since this change, the logger:report() emitted by when gen_statem crashes (when using callback_mode=handle_event_function) has a different value for the callback_mode key:
- it used to be the
handle_event_functionatom in OTP 26- - it is now the module's
fun Mod:handle_event/4
Not sure if this is a bug or intentional, feel free to close if it's the latter.
Just reporting in case it wasn't.
To Reproduce
(sorry in Elixir, taken from https://github.com/elixir-lang/elixir/pull/13684/files)
defmodule MyGenStatemFormatStatus do
@behaviour :gen_statem
@impl true
def callback_mode, do: :handle_event_function
@impl true
def init(state) do
{:ok, :no_state, state}
end
@impl true
def handle_event({:call, _}, :error, :no_state, _data) do
raise "oops"
end
endExpected behavior
Perhaps it should be consistent with OTP26- and return handle_event_function?
Affected versions
OTP 27.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue is reported as a bugIssue is reported as a bugpriority:mediumteam:PSAssigned to OTP team PSAssigned to OTP team PS