Better error message

This commit is contained in:
pietervdvn 2022-04-30 22:58:36 +02:00
parent 4fe7233071
commit 2f3886d2e0

View file

@ -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}`
}