Croma.Result.get-exclamation-mark

You're seeing just the function get-exclamation-mark, go back to Croma.Result module for more information.

Specs

get!(t(a)) :: a when a: any()

Returns the value associated with :ok in the given result. Raises ArgumentError if the result is in the form of {:error, _}.

Examples

iex> Croma.Result.get!({:ok, 1})
1

iex> Croma.Result.get!({:error, :foo})
** (ArgumentError) element not present: {:error, :foo}