Option::or_throw
If this value is Some(value), unwrap it, otherwise throw an exception.
Some(value)
Source Codepublic method or_throw<T>(this: Option<T>): T { match this { Some(v) => v, None => throw("Called `or_throw` on a `None` value.") } }
public method or_throw<T>(this: Option<T>): T { match this { Some(v) => v, None => throw("Called `or_throw` on a `None` value.") } }