mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 06:23:37 -05:00
Merge pull request #76 from tmickel/feature/no-try-catch
Remove try/catch in execution - fix #75
This commit is contained in:
commit
da4313cf05
1 changed files with 21 additions and 29 deletions
|
@ -58,7 +58,6 @@ var execute = function (sequencer, thread) {
|
|||
console.log('and stack frame: ', currentStackFrame);
|
||||
}
|
||||
var primitiveReturnValue = null;
|
||||
try {
|
||||
// @todo deal with the return value
|
||||
primitiveReturnValue = blockFunction(argValues, {
|
||||
yield: thread.yield.bind(thread),
|
||||
|
@ -71,12 +70,6 @@ var execute = function (sequencer, thread) {
|
|||
sequencer.stepToSubstack(thread, substackNum);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e) {
|
||||
console.error(
|
||||
'Exception calling block function for opcode: ' +
|
||||
opcode + '\n' + e);
|
||||
} finally {
|
||||
// Update if the thread has set a yield timer ID
|
||||
// @todo hack
|
||||
if (YieldTimers.timerId > oldYieldTimerId) {
|
||||
|
@ -88,7 +81,6 @@ var execute = function (sequencer, thread) {
|
|||
console.groupEnd();
|
||||
}
|
||||
return primitiveReturnValue;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = execute;
|
||||
|
|
Loading…
Reference in a new issue