or_else_throw


Description:

public G or_else_throw (SupplyFunc<Error>? error_supplier = null) throws Error

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




2022 vala-language.org