Defining Our Own Exceptions
Understand how to define our own exceptions in Elixir codes.
Exceptions in Elixir are basically records. We can define our own exceptions by creating a module. Inside it, we use defexception
to define the various fields in the exception, along with their default values. Because we’re creating a module, we can also add functions. Often, these are used to format the exception’s fields into ...