handle_continue
errors should be logged:
Interactive Elixir (1.15.0-dev) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> defmodule Foo do
...(1)> use GenServer
...(1)>
...(1)> def start_link(opts \\ []) do
...(1)> GenServer.start_link(__MODULE__, :ok, opts)
...(1)> end
...(1)>
...(1)> def init(:ok) do
...(1)> {:ok, :ok, {:continue, :what}}
...(1)> end
...(1)> end
{:module, Foo,
<<70, 79, 82, 49, 0, 0, 20, 52, 66, 69, 65, 77, 65, 116, 85, 56, 0, 0, 1, 221,
0, 0, 0, 50, 10, 69, 108, 105, 120, 105, 114, 46, 70, 111, 111, 8, 95, 95,
105, 110, 102, 111, 95, 95, 10, 97, 116, ...>>, {:init, 1}}
iex(2)> Foo.start_link
{:ok, #PID<0.114.0>}
iex(3)>
09:21:30.653 [error] GenServer #PID<0.114.0> terminating
** (UndefinedFunctionError) function Foo.handle_continue/2 is undefined or private
Foo.handle_continue(:what, :ok)
(stdlib 4.0) gen_server.erl:1120: :gen_server.try_dispatch/4
(stdlib 4.0) gen_server.erl:862: :gen_server.loop/7
(stdlib 4.0) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
Last message: {:continue, :what}
State: :ok
** (EXIT from #PID<0.108.0>) shell process exited with reason: an exception was raised:
** (UndefinedFunctionError) function Foo.handle_continue/2 is undefined or private
Foo.handle_continue(:what, :ok)
(stdlib 4.0) gen_server.erl:1120: :gen_server.try_dispatch/4
(stdlib 4.0) gen_server.erl:862: :gen_server.loop/7
(stdlib 4.0) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
There are two reports. One is logger and the other is from the linked process crash.