print file parsing errors to console

This commit is contained in:
Shawn Erquhart 2017-06-07 12:47:57 -04:00
parent e388ed1721
commit e36e1880d0

View File

@ -124,6 +124,7 @@ class Backend {
const format = resolveFormat(collectionOrEntity, entry);
if (entry && entry.raw !== undefined) {
const data = (format && attempt(format.fromFile.bind(null, entry.raw))) || {};
if (isError(data)) console.error(data);
return Object.assign(entry, { data: isError(data) ? {} : data });
}
return format.fromFile(entry);