or_else_throw
Description:
If a value is present, returns the value, otherwise throws an error produced by the supply function -- or an OptionalError.NOT_PRESENT error if the function is not specified.
Parameters:
error_supplier |
the supply function |
Returns:
the value if present |
Exceptions:
Error |
an error produced by the supply function if no value is present |