diff options
Diffstat (limited to 'src/data')
-rw-r--r-- | src/data/things/cacheable-object.js | 2 | ||||
-rw-r--r-- | src/data/yaml.js | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/data/things/cacheable-object.js b/src/data/things/cacheable-object.js index a8610fad..6b8d5def 100644 --- a/src/data/things/cacheable-object.js +++ b/src/data/things/cacheable-object.js @@ -356,6 +356,8 @@ export default class CacheableObject { } export class CacheableObjectPropertyValueError extends Error { + [Symbol.for('hsmusic.aggregate.translucent')] = true; + constructor(property, oldValue, newValue, error) { super( `Error setting ${colors.green(property)} (${inspect(oldValue)} -> ${inspect(newValue)})`, diff --git a/src/data/yaml.js b/src/data/yaml.js index f2540b65..1fd37b2f 100644 --- a/src/data/yaml.js +++ b/src/data/yaml.js @@ -346,12 +346,7 @@ export class FieldValueAggregateError extends AggregateError { } export class FieldValueError extends Error { - constructor(field, property, value, caughtError) { - const cause = - (caughtError instanceof CacheableObjectPropertyValueError - ? caughtError.cause - : caughtError); - + constructor(field, property, value, cause) { const fieldText = colors.green(`"${field}"`); |