debug: log draw errors instead of silent pcall swallowing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user