From 2f3886d2e0da5115df425826d487dd33dfaf81e9 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sat, 30 Apr 2022 22:58:36 +0200 Subject: [PATCH] Better error message --- Models/ThemeConfig/LayerConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Models/ThemeConfig/LayerConfig.ts b/Models/ThemeConfig/LayerConfig.ts index e4fe9cb4b..24fc810bd 100644 --- a/Models/ThemeConfig/LayerConfig.ts +++ b/Models/ThemeConfig/LayerConfig.ts @@ -175,7 +175,7 @@ export default class LayerConfig extends WithContextLoader { try { new Function("feat", "return " + code + ";"); } catch (e) { - throw `Invalid function definition: code ${code} is invalid:${e} (at ${context})` + throw `Invalid function definition: the custom javascript is invalid:${e} (at ${context}). The offending javascript code is:\n ${code}` }