Improve error message

This commit is contained in:
Pieter Vander Vennet 2023-09-17 13:11:06 +02:00
parent 0a1d0744f7
commit 559a129d8d

View file

@ -42,7 +42,9 @@ export default class DependencyCalculator {
const preset = layer.presets[i]
const snapTo = preset.preciseInput?.snapToLayers
if (snapTo && !Array.isArray(snapTo)) {
throw new Error("snapToLayers is not an array; it is " + snapTo)
throw new Error(
`snapToLayers is not an array; it is ${snapTo}(used in preset ${i} for: ${layer.id})`
)
}
preset.preciseInput?.snapToLayers?.forEach((id) => {
deps.push({