Removing log messages.

This commit is contained in:
Karishma Chadha 2018-02-28 17:10:54 -05:00
parent 7c7b016643
commit d9fb315e3b

View file

@ -228,9 +228,7 @@ class VirtualMachine extends EventEmitter {
// Validate & parse // Validate & parse
if (typeof json !== 'string' && typeof json !== 'object') { if (typeof json !== 'string' && typeof json !== 'object') {
const invalidTypeError = 'Failed to parse project. Invalid type supplied to fromJSON.'; throw new Error('Failed to parse project. Invalid type supplied to fromJSON.');
log.error(invalidTypeError);
throw new Error(invalidTypeError);
} }
// Establish version, deserialize, and load into runtime // Establish version, deserialize, and load into runtime
@ -249,10 +247,8 @@ class VirtualMachine extends EventEmitter {
const possibleSb2 = typeof json === 'object' ? JSON.stringify(json) : json; const possibleSb2 = typeof json === 'object' ? JSON.stringify(json) : json;
validate(possibleSb2, (err, project) => { validate(possibleSb2, (err, project) => {
if (err) { if (err) {
const errorMessage = throw new Error(
`The given project could not be validated, parsing failed with error: ${JSON.stringify(err)}`; `The given project could not be validated, parsing failed with error: ${JSON.stringify(err)}`);
log.error(errorMessage);
throw new Error(errorMessage);
} else { } else {
deserializer = sb2; deserializer = sb2;