From 0a56ac3b146ca1ad9f9e0ee6ce53e7b1486853ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 30 May 2024 21:50:53 +0200 Subject: [PATCH] Do not hide information when failing to start children Otherwise in-depth failures are simply reported as :shutdown. --- lib/kino.ex | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/kino.ex b/lib/kino.ex index 82704076..ee08045b 100644 --- a/lib/kino.ex +++ b/lib/kino.ex @@ -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`.