WaitForPromise (open)
Synchronously waits for a promise to resolve
Syntax
// Core function, no LOADLIB necessary
VARIANT FUNCTION WaitForPromise(OBJECT promise, RECORD options)Parameters
OBJECT promisePromise to wait for
RECORD optionsOptions
DATETIME timeoutTimeout
timeoutvalueValue to return in case of timeout (the function will throws if this is not provided)
Return value
VARIANTReturn value of the promise if resolved (or an exception if rejected)