OkThen.Result.unwrap-exclamation-mark

You're seeing just the function unwrap-exclamation-mark, go back to OkThen.Result module for more information.
Link to this function

unwrap!(result)

Specs

unwrap!(result_input()) :: any()

Same as unwrap_or_else/2, except raises ArgumentError if result is not tagged :ok.

Examples

iex> {:ok, "hello"} |> Result.unwrap!()
"hello"

iex> :ok |> Result.unwrap!()
{}

iex> :error |> Result.unwrap!()
** (ArgumentError) Result is not tagged ok: :error.

iex> {:error, "hello"} |> Result.unwrap!()
** (ArgumentError) Result is not tagged ok: {:error, "hello"}.

iex> :none |> Result.unwrap!()
** (ArgumentError) Result is not tagged ok: :none.

iex> "hello" |> Result.unwrap!()
** (ArgumentError) Result is not tagged ok: "hello".