View Source Splode.Error behaviour (splode v0.2.5)
Use this module to create an aggregatable error.
For example:
defmodule MyApp.Errors.InvalidArgument do
use Splode.Error, fields: [:name, :message], class: :invalid
def message(%{name: name, message: message}) do
"Invalid argument #{name}: #{message}"
end
end
Summary
Types
@type t() :: Exception.t()