Use lib/log instead of console.log for project parsing error

This commit is contained in:
Connor Hudson 2018-06-26 08:41:06 -04:00
parent 80dfaa6a1e
commit da1fe6a6fc

View file

@ -7,6 +7,7 @@ const parser = require('scratch-parser');
const Page = require('../../components/page/www/page.jsx');
const render = require('../../lib/render.jsx');
const storage = require('../../lib/storage.js').default;
const log = require('../../lib/log');
const EXTENSION_INFO = require('../../lib/extensions.js').default;
const PreviewPresentation = require('./presentation.jsx');
@ -120,7 +121,7 @@ class Preview extends React.Component {
}
parser(projectAsset.data, false, (err, projectData) => {
if (err) {
console.log('Caught project parsing error:', err); // eslint-disable-line no-console
log.error(`Unhandled project parsing error: ${err}`);
return;
}
const extensionSet = new Set();