I’m just discovering defexception but I think the docs are not correct (?). It says " The Exception
(https://hexdocs.pm/elixir/Exception.html) behaviour requires two functions to be implemented: exception/1
and message/1
" — but I think only the message/1
needs to be implemented. Is this correct?
It’s correct. The behaviour requires it, and the defexception macro gives you a default implementation; agreed that the verbiage is slightly confusing.