error v0.3.5 Error View Source
Model domain and infrastructure errors as regular data.
Link to this section Summary
Functions
Extract the cause of an error (of type Error.t()
).
Return the map of detailed information supplied at Error
creation.
Create a domain
error, with a reason and optional details.
Create an infra
error, with a reason and optional details.
Determine whether a given Error
is a domain
or infra
error.
Map a function on the details
map in an Error
.
Return the reason the Error
was created with.
Wrap a higher-level error 'on top' of a lower-level error.
Link to this section Types
Link to this section Functions
Extract the cause of an error (of type Error.t()
).
Think of this as inspecting deeper into the stack trace.
Return the map of detailed information supplied at Error
creation.
Create a domain
error, with a reason and optional details.
Create an infra
error, with a reason and optional details.
Determine whether a given Error
is a domain
or infra
error.
Map a function on the details
map in an Error
.
Useful for adding extra details, modifying exisint ones, or removing them.
Return the reason the Error
was created with.
Convert an Error
to an Elixir map.
Wrap a higher-level error 'on top' of a lower-level error.
Think of this as a stack trace, but in domain-model terms.