Skip to main content

Promise.Catch(function onError)

Associates a handler to be called when promise encounters an error. The Error string will be passed to associated function.

Parameters:

NameTypeDescription
onErrorfunctionThe handler to be called when promise encounters an error.

Returns:

typeDescription
Promiseitself.

Usage

---@type Promise
local promise;

---@type function
local onError;


local val0 = promise.Catch(onError)