fix: error message is not included in coroutine error alert
This commit is contained in:
parent
b00160eb26
commit
e5f9efd87a
@ -419,8 +419,9 @@ end
|
|||||||
|
|
||||||
function start_coroutine(chunk, name)
|
function start_coroutine(chunk, name)
|
||||||
local co = coroutine.create(function()
|
local co = coroutine.create(function()
|
||||||
local status, error = xpcall(chunk, function(...)
|
local status, error = xpcall(chunk, function(err)
|
||||||
gui.alert(debug.traceback(), function()
|
local fullmsg = "error: "..string.match(err, ": (.+)").."\n"..debug.traceback()
|
||||||
|
gui.alert(fullmsg, function()
|
||||||
if world.is_open() then
|
if world.is_open() then
|
||||||
__vc_app.close_world()
|
__vc_app.close_world()
|
||||||
else
|
else
|
||||||
@ -429,7 +430,7 @@ function start_coroutine(chunk, name)
|
|||||||
menu.page = "main"
|
menu.page = "main"
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
return ...
|
return fullmsg
|
||||||
end)
|
end)
|
||||||
if not status then
|
if not status then
|
||||||
debug.error(error)
|
debug.error(error)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user