From 9d62626752edfeb3bd981fc01565a9de8af200ba Mon Sep 17 00:00:00 2001 From: Eric Selin Date: Sun, 24 Oct 2021 16:05:25 +0200 Subject: [PATCH] fix: Add affected content file to crash output --- core/api.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/api.ts b/core/api.ts index d8a2792..3412cb8 100644 --- a/core/api.ts +++ b/core/api.ts @@ -99,11 +99,16 @@ export const build: Builder = async (options) => { let renderCount = 0; for await (const filepath of walkDirty(contentDir)) { + try { const rendered = await process(filepath); if (rendered) { renderCount++; } + } catch (e) { + log?.error(`Error rendering page ${filepath.relativePath}!`); + throw e; + } } return {