debug: log draw errors instead of silent pcall swallowing

This commit is contained in:
MayaTheShy
2026-03-22 18:52:23 -04:00
parent c4acc2159e
commit 64b3e4b069

View File

@@ -412,7 +412,8 @@ local function main()
while true do
if state.needsRedraw then
state.needsRedraw = false
pcall(display.drawDashboard)
local dok, derr = pcall(display.drawDashboard)
if not dok then log.error("DRAW", "Dashboard: %s", tostring(derr)) end
end
if state.statusTimer > 0 then
state.statusTimer = state.statusTimer - 0.1
@@ -434,7 +435,8 @@ local function main()
while true do
if state.smelterNeedsRedraw then
state.smelterNeedsRedraw = false
pcall(display.drawSmelterDashboard)
local sok, serr = pcall(display.drawSmelterDashboard)
if not sok then log.error("DRAW", "Smelter: %s", tostring(serr)) end
end
sleep(0.1)
end