Code:
counter = 0
function loop()
counter = counter + 1
reaper.ShowConsoleMsg(string.format("loop %d\n", counter))
pcall(function()
gfx.hello_world = 42
end)
if counter < 50 then
reaper.defer(loop)
end
end
loop()
Result:
When clicking on the "Continue" button in the error dialog, the loop() function is ran only twice, instead of 50 times:
Expected:
No error dialog at all (because of pcall), or a least it should not abort the script when clicking on the Continue button.