Skip to main content

Future

Object that contains result of operation that cant be finished immediately

warning

This page is a WIP. It contains all the information in Figura's documentation but we're working on adding more helpful descriptions.


getOrError()​

Throws error if it occurred while execution of this future, returns value otherwise

getOrError()

Returns:

TypeDescription
AnyType-

Example:

-- example coming soon

getValue()​

Returns value of this future object if future was executed successfully

getValue()

Returns:

TypeDescription
AnyType-

Example:

-- example coming soon

hasError()​

Checks if error occurred while this future execution

hasError()

Returns:

TypeDescription
Boolean-

Example:

-- example coming soon

isDone()​

Checks if future is done, either successfully or with error

isDone()

Returns:

TypeDescription
Boolean-

Example:

-- example coming soon

throwError()​

Throws an error if it occurred while execution of this future.

throwError()

Returns:

TypeDescription
nil-

Example:

-- example coming soon