I'm trying to do a `pcall(...)` inside a `Canvas:renderTo(...)`, which looks as follows (with the `print(...)` calls added for debugging):
Code: Select all
function renderTo(func)
if canvas then
canvas:renderTo(function()
print('before')
pcall(func)
print('after')
end)
end
end
It works fine when there is no error raised by `func`, but when it does raise an error, I get:
Code: Select all
Error: [string "boot.lua"]:514: present cannot be called while a Canvas is active.
FWIW, I am on 11.0, will try upgrading to 11.1 soon.