Release v4.9.0
- Option
getOrThrow
method
>>> Option::some(1)->getOrThrow(fn() => new RuntimeException('???'));
=> 1
>>> Option::none()->getOrThrow(fn() => new RuntimeException('???'));
RuntimeException with message '???'
getOrThrow
method>>> Option::some(1)->getOrThrow(fn() => new RuntimeException('???'));
=> 1
>>> Option::none()->getOrThrow(fn() => new RuntimeException('???'));
RuntimeException with message '???'