« get me outta code hell

infra: hint error when bad object constructor - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content-function.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-06-04 13:08:44 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-06-04 13:08:44 -0300
commit49be54d42dac05a5f12fce749318ceacad8564e8 (patch)
treec43a61c759bdb58749da630185e043eed6be27a1 /src/content-function.js
parent3096df0c06a750fc5a09e3bde93c7e524ee2b310 (diff)
infra: hint error when bad object constructor
This isn't really proper error handling or validation, but it'll make
this error a little less annoying to deal with meanwhile.
Diffstat (limited to 'src/content-function.js')
-rw-r--r--src/content-function.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/content-function.js b/src/content-function.js
index 3536d5a..73e4629 100644
--- a/src/content-function.js
+++ b/src/content-function.js
@@ -325,7 +325,7 @@ export function fillRelationsLayoutFromSlotResults(relationIdentifier, results,
     }
 
     if (object.constructor !== Object) {
-      throw new Error(`Expected primitive, array, relation, or normal {key: value} style Object`);
+      throw new Error(`Expected primitive, array, relation, or normal {key: value} style Object, got constructor ${object.constructor?.name}`);
     }
 
     return Object.fromEntries(