exception_support_off.runtime.js

来自「javascript扩展库」· JavaScript 代码 · 共 38 行

JS
38
字号
var continuation;function halt(c) {	if (c.isResuming())		return c.commence();	continuation = c;	return c.suspend();}function foo() {	var x = halt->();	trace(x);}foo();continuation.except("no exception");assertTrail("no exception");function bar() {	trace("before halt");	var x = halt->();	throw(x);}try {	bar();} catch(e) {	trace("shouldn't get here");}try {	continuation.resume("after halt");} catch(e) {	trace(e);}assertTrail("before halt", "after halt");

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?