Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions libs/estdlib/src/gen_server.erl
Original file line number Diff line number Diff line change
Expand Up @@ -125,22 +125,22 @@ init_it(Starter, Name, Module, Args, Options) ->
init_it(Starter, Module, Args, Options)
catch
error:badarg:S ->
ErrorT =
case whereis(Name) of
undefined ->
badarg;
Pid when is_pid(Pid) ->
{already_started, Pid}
end,
crash_report(
io_lib:format("gen_server:init_it/5: Error initializing module ~p under name ~p", [
Module, Name
]),
Starter,
ErrorT,
S
),
proc_lib:init_ack(Starter, {error, ErrorT})
case whereis(Name) of
undefined ->
crash_report(
io_lib:format(
"gen_server:init_it/5: Error initializing module ~p under name ~p", [
Module, Name
]
),
Starter,
badarg,
S
),
proc_lib:init_ack(Starter, {error, badarg});
Pid when is_pid(Pid) ->
proc_lib:init_ack(Starter, {error, {already_started, Pid}})
end
end.

init_it(Starter, Module, Args, Options) ->
Expand Down
Loading