Garden 🌻

Result::or_throw

If this value is Ok, unwrap it, otherwise throw an exception.

Source Codepublic method or_throw<T, E>(this: Result<T, E>): T {
  match this {
    Ok(v) => v
    Err(e) => throw(" ".join(["Called `or_throw()` on an `Err`.", string_repr(e)]))
  }
}