Elixir Exceptions are Structs
Elixir Exceptions are actually Structs
:
Map.keys %RuntimeError{}
#=> [:__exception__, :__struct__, :message]
%RuntimeError{}.message
#=> "runtime error"
This is also true when you define an Exception with defexception
.