Skip to main content

function.pcall(newContextObject, values)

Calls the function with a non-default context object, bypassing Squirrel error callbacks


Device + Agent


Name Type Description
newContextObject Object An alternative context object
values Any One or more function parameter values




The method pcall() matches the functionality of the method call(): it allows you to pass a non-default context object to a function when that function is called. However, pcall() will not trigger Squirrel’s error callback if the function call fails for some reason.

Further Information

For more detailed guidance on the role of context objects in Squirrel, please see Squirrel Closures And Context Objects.