Update Libraries from s.b.e

pull/29/head
Michael Ball 2016-12-27 13:59:47 -08:00 zatwierdzone przez GitHub
rodzic 1e6465b96a
commit c650769d08
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1 @@
<blocks app="Snap! 4.0, http://snap.berkeley.edu" version="1"><block-definition s="safely try %&apos;action&apos; then if %&apos;error&apos; %&apos;handler&apos;" type="command" category="control"><header></header><code></code><inputs><input type="%cs"></input><input type="%upvar"></input><input type="%cs"></input></inputs><script><custom-block s="let %upvar be %s"><l>reset</l><block s="evaluate"><block s="reportJSFunction"><list><l>proc</l></list><l>var oldHandleError = proc.handleError,&#xD; oldCatchingErrors = proc.isCatchingErrors;&#xD;&#xD;return function(){&#xD; proc.handleError = oldHandleError;&#xD; proc.isCatchingErrors = oldCatchingErrors;&#xD;}</l></block><list></list></block></custom-block><block s="doCallCC"><block s="reifyScript"><script><block s="doRun"><block s="reportJSFunction"><list><l>reset</l><l>action</l><l>handler</l><l>proc</l></list><l>proc.isCatchingErrors = true;&#xD;proc.handleError = function(error, element){&#xD; reset();&#xD; proc.context = handler;&#xD; proc.context.variables.setVar("error", error);&#xD;}&#xD;&#xD;try{&#xD; proc.evaluate(action, new List(), true);&#xD;}&#xD;catch(e){&#xD; proc.handleError(e, null);&#xD;} </l></block><list><block var="reset"/><block var="action"/><block s="reifyScript"><script><block s="doRun"><block s="reifyScript"><script><block s="doRun"><block var="handler"/><list></list></block><block s="doRun"><block var="return"/><list></list></block></script><list></list></block><list></list></block></script><list></list></block></list></block></script><list><l>return</l></list></block></block><block s="doRun"><block var="reset"/><list></list></block></script></block-definition><block-definition s="error %&apos;msg&apos;" type="command" category="control"><header></header><code></code><inputs><input type="%txt"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>msg</l></list><l>throw new Error(msg);</l></block><list><block var="msg"/></list></block></script></block-definition><block-definition s="let %&apos;var&apos; be %&apos;val&apos;" type="command" category="other"><header></header><code></code><inputs><input type="%upvar"></input><input type="%s"></input></inputs><script><block s="doSetVar"><l>var</l><block var="val"/></block></script></block-definition></blocks>