View Source TypedStructor.Definer.Defexception (TypedStructor v0.5.0)
A definer to define an exception and a type for a given definition.
Additional options for typed_structor
:define_struct
- iffalse
, the type will be defined, but the struct will not be defined. Defaults totrue
.
Usage
defmodule MyException do
use TypedStructor
typed_structor definer: :defexception, define_struct: false do
field :message, String.t()
end
end
Summary
Functions
Defines an exception and a type for a given definition.
Functions
Defines an exception and a type for a given definition.