   end
 
   defp format_stop_banner(reason, stacktrace) do
+    # If this is already an exception (even an ErlangError), we format it as an
+    # exception. Otherwise, we try to normalize it, and if it's normalized as an
+    # ErlangError we instead format it as an exit.
     if Exception.exception?(reason) do
-        [?\n | Exception.format_banner(:error, reason, stacktrace)]
+      [?\n | Exception.format_banner(:error, reason, stacktrace)]
     else
       case Exception.normalize(:error, reason, stacktrace) do
         %ErlangError{} ->


  defp translate_progress(min_level,
                          [supervisor: sup,
                            started: [{:pid, pid}, {name_or_id, name} | started]]) when name_or_id in [:name, :id] do
    {:ok, ["Child ", inspect(name), " of Supervisor ",
            sup_name(sup), " started",
            "\nPid: ", inspect(pid) |
            child_info(min_level, started)]}
  end

  defp translate_progress(min_level,
                          [supervisor: sup,
                            started: [{:pid, pid} | started]]) do
    {:ok, ["Child of Supervisor ", sup_name(sup), " started",
            "\nPid: ", inspect(pid) |
            child_info(min_level, started)]}
  end

  defp translate_progress(_min_level, _other), do: :none

  @gen_undef [:"module could not be loaded", :"function not exported"]

  defp format_stop_banner(undef, [{mod, fun, args, _info} | _]  = stacktrace)
       when undef in @gen_undef and is_atom(mod) and is_atom(fun) do
    cond do
      is_list(args) ->
        format_undef(mod, fun, length(args), undef, stacktrace)
