Skip to content
Merged
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions lib/elixir/lib/exception.ex
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ defmodule Exception do
defp rewrite_arg(arg) do
Macro.prewalk(arg, fn
{:%{}, meta, [__struct__: Range, first: first, last: last, step: step]} ->
{:..//, meta, [first, last, step]}
{:"..//", meta, [first, last, step]}

other ->
other
Expand Down Expand Up @@ -1997,11 +1997,11 @@ defmodule Protocol.UndefinedError do

@impl true
def message(%{protocol: protocol, value: value, description: description}) do
"protocol #{inspect(protocol)} not implemented for #{inspect(value)} of type " <>
"protocol #{inspect(protocol)} not implemented for #{inspect(value, pretty: true)} of type " <>
value_type(value) <> maybe_description(description) <> maybe_available(protocol)
end

defp value_type(%{__struct__: struct}), do: "#{inspect(struct)} (a struct)"
defp value_type(%{__struct__: struct}), do: "#{inspect(struct, pretty: true)} (a struct)"
defp value_type(value) when is_atom(value), do: "Atom"
defp value_type(value) when is_bitstring(value), do: "BitString"
defp value_type(value) when is_float(value), do: "Float"
Expand Down