Don't fail TOO quietly during config boot

This commit is contained in:
Zef Hemel
2025-09-13 19:33:40 +02:00
parent e3f1641f48
commit 0ebbebdfa6
+7 -3
View File
@@ -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;