1
0
mirror of https://github.com/GenderDysphoria/GenderDysphoria.fyi.git synced 2025-11-25 20:42:40 +00:00

Catching a few more bugs

This commit is contained in:
Jocelyn Badgley (Twipped)
2020-03-15 16:49:03 -07:00
parent 3d10c98f1c
commit 2aea19bd05
5 changed files with 22 additions and 9 deletions

View File

@@ -4,6 +4,8 @@ const fs = require('fs-extra');
const { map, uniq } = require('lodash');
const { resolve, ROOT } = require('./resolve');
const { siteInfo } = require(resolve('package.json'));
const log = require('fancy-log');
module.exports = exports = async function writePageContent (engines, pages, posts, prod) {
const postIndex = index(posts, engines);
@@ -99,7 +101,12 @@ function processPages (engines, pages, posts, prod) {
const state = pageState(page, posts);
const json = pageJSON(page);
const html = String(engines[page.engine](page.source, state));
try {
var html = String(engines[page.engine](page.source, state));
} catch (e) {
throw new Error(`Error while processing page "${page.input}": ${e.message}`);
}
json.content = page.content;