3
0
mirror of https://github.com/britzl/monarch.git synced 2025-06-27 10:27:49 +02:00

Print errors if caught in the callback tracker

This commit is contained in:
Björn Ritzl 2020-05-28 08:08:35 +02:00
parent 4ad86d41fc
commit bf880b80fd

View File

@ -44,7 +44,10 @@ function M.create()
function instance.yield_until_done() function instance.yield_until_done()
local co = coroutine.running() local co = coroutine.running()
callback = function() callback = function()
coroutine.resume(co) local ok, err = coroutine.resume(co)
if not ok then
print(err)
end
end end
invoke_if_done() invoke_if_done()
if not is_done() then if not is_done() then