make error messages occurring in generic WHEN hat scripts visible

pull/29/head
jmoenig 2017-01-11 13:39:48 +01:00
rodzic c4e1247f6e
commit ed407dc558
2 zmienionych plików z 12 dodań i 3 usunięć

Wyświetl plik

@ -3264,6 +3264,14 @@ http://snap.berkeley.edu/run#cloud:Username=jens&ProjectName=rotation
* GUI: Libraries Browser, thanks, Michael!
* Blocks: Fixed out of bounds issue with “go back _ layers”, thanks, Brian Broll!
170110
------
* German translation update
170111
------
* Error handling improvements for custom drop-down submenus and generic WHEN hats
== v4.10 === (in development)

Wyświetl plik

@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy,
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph,
TableFrameMorph, ColorSlotMorph, isSnapObject*/
modules.threads = '2017-January-04';
modules.threads = '2017-January-11';
var ThreadManager;
var Process;
@ -361,6 +361,9 @@ ThreadManager.prototype.findProcess = function (block) {
ThreadManager.prototype.doWhen = function (block, stopIt) {
if (this.pauseCustomHatBlocks) {return; }
if ((!block) || this.findProcess(block)) {
return;
}
var pred = block.inputs()[0], world;
if (block.removeHighlight()) {
world = block.world();
@ -369,8 +372,6 @@ ThreadManager.prototype.doWhen = function (block, stopIt) {
}
}
if (stopIt) {return; }
if ((!block) || this.findProcess(block)
) {return; }
try {
if (invoke(
pred,