« get me outta code hell

data steps: more "quick" functions & basic snapshot test demo - 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-03-25 15:00:01 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-03-25 15:05:30 -0300
commitd1e586bd401a6d83ecabafb3b833a5ae65b6e05f (patch)
tree81a97f0f678f9618ed0a66d1e5ef9d35dbf79a2a /src/content-function.js
parentfc5d4d057b1e18e3e5c91bce1ddb545bc9d91db9 (diff)
data steps: more "quick" functions & basic snapshot test demo
Diffstat (limited to 'src/content-function.js')
-rw-r--r--src/content-function.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/content-function.js b/src/content-function.js
index dbac691..0a21780 100644
--- a/src/content-function.js
+++ b/src/content-function.js
@@ -383,6 +383,7 @@ export function quickEvaluate({
   // provided as part of allContentDependencies or allExtraDependencies.
   // Catch and report these early, together in an aggregate error.
   const unfulfilledErrors = [];
+  const unfulfilledNames = [];
   for (const name of neededContentDependencyNames) {
     const contentFunction = fulfilledContentDependencies[name];
     if (!contentFunction) continue;
@@ -392,12 +393,13 @@ export function quickEvaluate({
       } catch (error) {
         error.message = `(${name}) ${error.message}`;
         unfulfilledErrors.push(error);
+        unfulfilledNames.push(name);
       }
     }
   }
 
   if (!empty(unfulfilledErrors)) {
-    throw new AggregateError(unfulfilledErrors, `Content functions unfulfilled`);
+    throw new AggregateError(unfulfilledErrors, `Content functions unfulfilled (${unfulfilledNames.join(', ')})`);
   }
 
   const slotResults = {};