Executes a function in protected mode with a custom error handler
See also Lua library functions.
Signature:
status,
...
=
xpcall(f,
err)
Arguments:
f
- A function (function
)err
- Error handler function to be used shouldf
cause an error (function
)
Returns:
status
- True if the function succeeded without errors; false otherwise (boolean
)...
- Ifstatus
isfalse
, the error message produced by the function; ifstatus
istrue
, the return values from the function (list or string
)
This function is defined in the Lua standard libraries