mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-28 06:59:45 -04:00
Fix eslint errors
This includes adding a line to `.eslintrc` to allow `console.log`, `console.warn`, and `console.error`.
This commit is contained in:
parent
4a3276d026
commit
751ca97733
3 changed files with 18 additions and 15 deletions
src/engine
|
@ -60,23 +60,24 @@ Sequencer.prototype.stepThreads = function (threads) {
|
|||
Sequencer.prototype.stepThread = function (thread) {
|
||||
var opcode = this.runtime._getOpcode(thread.nextBlock);
|
||||
|
||||
if (!opcode) {
|
||||
console.warn('Could not get opcode for block: ' + thread.nextBlock);
|
||||
if (!opcode) {
|
||||
console.warn('Could not get opcode for block: ' + thread.nextBlock);
|
||||
}
|
||||
else {
|
||||
var blockFunction = this.runtime.getOpcodeFunction(opcode);
|
||||
if (!blockFunction) {
|
||||
console.warn('Could not get implementation for opcode: ' + opcode);
|
||||
}
|
||||
else {
|
||||
var blockFunction = this.runtime.getOpcodeFunction(opcode);
|
||||
if (!blockFunction) {
|
||||
console.warn('Could not get implementation for opcode: ' + opcode);
|
||||
try {
|
||||
blockFunction();
|
||||
}
|
||||
else {
|
||||
try {
|
||||
blockFunction();
|
||||
}
|
||||
catch(e) {
|
||||
console.error('Exception calling block function', {opcode: opcode, exception: e});
|
||||
}
|
||||
catch(e) {
|
||||
console.error('Exception calling block function',
|
||||
{opcode: opcode, exception: e});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
thread.nextBlock = this.runtime._getNextBlock(thread.nextBlock);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue