mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 15:02:52 -05:00
Removing log messages.
This commit is contained in:
parent
7c7b016643
commit
d9fb315e3b
1 changed files with 3 additions and 7 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue