From 036e13a2caa8d9e9ccb8984039ebe2e89c2a037c Mon Sep 17 00:00:00 2001 From: MihailRis Date: Fri, 17 Jan 2025 01:42:01 +0300 Subject: [PATCH] improve app scripts error handling --- res/scripts/stdlib.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/res/scripts/stdlib.lua b/res/scripts/stdlib.lua index cc1aa23f..0df1c387 100644 --- a/res/scripts/stdlib.lua +++ b/res/scripts/stdlib.lua @@ -480,7 +480,10 @@ function __process_post_runnables() local dead = {} for name, co in pairs(__vc_named_coroutines) do - coroutine.resume(co) + local success, err = coroutine.resume(co) + if not success then + debug.error(err) + end if coroutine.status(co) == "dead" then table.insert(dead, name) end