 
   @typedoc "The exception type"
   @type t :: %{
-    required(:__struct__) => module,
-    required(:__exception__) => true,
-    optional(atom) => any,
-  }
+          required(:__struct__) => module,
+          required(:__exception__) => true,
+          optional(atom) => any
+        }
 
   @typedoc "The kind handled by formatting functions"
   @type kind :: :error | non_error_kind

  defexception [:protocol, :value, description: ""]

  def message(%{protocol: protocol, value: value, description: description}) do
    "protocol #{inspect protocol} not implemented for #{inspect value}" <>
      maybe_description(description) <> maybe_available(protocol)
  end


      formatted_stacktrace ->
        # Assume a non-empty list formattable as stacktrace is a
        # stacktrace, so exit was caused by an error.
        message =
          "an exception was raised:" <>
            joiner <> format_banner(:error, exception, maybe_stacktrace)

        Enum.join([message | formatted_stacktrace], joiner <> <<"    ">>)
    end
  end

  # :supervisor.start_link returns this error reason when it fails to init
  # because a child's start_link raises.
  defp format_exit({:shutdown, {:failed_to_start_child, child, {:EXIT, reason}}}, joiner) do
    format_start_child(child, reason, joiner)
  end

  # :supervisor.start_link returns this error reason when it fails to init
  # because a child's start_link returns {:error, reason}.
  defp format_exit({:shutdown, {:failed_to_start_child, child, reason}}, joiner) do
    format_start_child(child, reason, joiner)
  end

  # 2-Tuple could be an exit caused by mfa if second element is mfa, args
  # must be a list of arguments - max length 255 due to max arity.
  defp format_exit({reason2, {mod, fun, args}} = reason, joiner)
       when length(args) < 256 do
    try do
      format_mfa(mod, fun, args)
    catch
