xema v0.9.0 Xema.CastError exception View Source

Raised when a cast fails.

Link to this section Summary

Functions

Formats the error map to an error message.

Link to this section Types

Link to this type

error() View Source
error() :: %{
  to: atom(),
  value: term(),
  key: String.t(),
  path: [atom() | integer() | String.t()]
}

Link to this type

t() View Source
t() :: %Xema.CastError{
  __exception__: term(),
  key: term(),
  message: term(),
  path: term(),
  to: term(),
  value: term()
}

Link to this section Functions

Link to this function

format_error(map) View Source
format_error(Exception.t() | error()) :: String.t()

Formats the error map to an error message.