« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/util/html.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/util/html.js b/src/util/html.js
index ba31173d..95c5e45b 100644
--- a/src/util/html.js
+++ b/src/util/html.js
@@ -1068,7 +1068,13 @@ export class Template {
       slots[slotName] = this.getSlotValue(slotName);
     }
 
-    return this.description.content(slots);
+    try {
+      return this.description.content(slots);
+    } catch (caughtError) {
+      throw new Error(
+        `Error computing content of ${inspect(this, {compact: true})}`,
+        {cause: caughtError});
+    }
   }
 
   set description(_value) {