From 0ebbebdfa63cba56b6b785a807d00dc086b2e09e Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sat, 13 Sep 2025 19:33:40 +0200 Subject: [PATCH] Don't fail TOO quietly during config boot --- web/boot_config.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/web/boot_config.ts b/web/boot_config.ts index b8148dd3..2bca3d64 100644 --- a/web/boot_config.ts +++ b/web/boot_config.ts @@ -77,11 +77,15 @@ export async function loadConfig( for (const statement of chunk.statements) { try { await evalStatement(statement, localEnv, sf); - } catch { + } catch (e: any) { // Since people may do whatever in their Lua code, we're going to be extremely liberal in ignoring errors // Primarily config.* calls are processed, the rest is implicitly ignored through failure - // TODO: Don't show anything - // console.info("Statement errored out, but ignoring:", e.message); + console.info( + "Statement errored out during boot, but ignoring:", + luaCode.slice(statement.ctx.from, statement.ctx.to), + "Error:", + e.message, + ); } } return config;