Skip to content

Commit

Permalink
Do not hide information when failing to start children
Browse files Browse the repository at this point in the history
Otherwise in-depth failures are simply reported as :shutdown.
  • Loading branch information
josevalim committed May 30, 2024
1 parent a1d8739 commit 0a56ac3
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/kino.ex
Original file line number Diff line number Diff line change
Expand Up @@ -459,18 +459,10 @@ defmodule Kino do

{:error, reason} ->
raise "failed to start child with the spec #{Kernel.inspect(child_spec)}.\n" <>
"Reason: #{start_supervised_error(reason)}"
"Reason: #{Exception.format_exit(reason)}"
end
end

defp start_supervised_error({{:EXIT, reason}, info}) when is_tuple(info),
do: Exception.format_exit(reason)

defp start_supervised_error({reason, info}) when is_tuple(info),
do: Exception.format_exit(reason)

defp start_supervised_error(reason), do: Exception.format_exit(reason)

@doc """
Terminates a child started with `start_child/1`.
Expand Down

0 comments on commit 0a56ac3

Please sign in to comment.