An exception raised when a protocol is not implemented for a given value.
The following fields of this exception are public and can be accessed freely:
:protocol (module/0) - the protocol that is not implemented:value (term/0) - the value that does not implement the protocolFor example, this code:
Enum.at("A string!", 0)
would raise the following exception:
%Protocol.UndefinedError{
protocol: Enumerable,
value: "A string!",
# ...
}
© 2012-2024 The Elixir Team
Licensed under the Apache License, Version 2.0.
https://hexdocs.pm/elixir/1.18.1/Protocol.UndefinedError.html