Skip to content

Commit

Permalink
fix: Add affected content file to crash output
Browse files Browse the repository at this point in the history
  • Loading branch information
ericselin committed Oct 24, 2021
1 parent e85c38e commit 9d62626
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 9d62626

Please sign in to comment.