michael@0: // Don't fail if code after try statement is unreachable. michael@0: function f() { michael@0: try { michael@0: throw 1; michael@0: } catch(e) { michael@0: throw 5; michael@0: } michael@0: michael@0: // Unreachable. michael@0: assertEq(0, 2); michael@0: var res = 0; michael@0: for (var i=0; i<10; i++) michael@0: res += 2; michael@0: return res; michael@0: } michael@0: michael@0: var c = 0; michael@0: michael@0: for (var i=0; i<5; i++) { michael@0: try { michael@0: f(); michael@0: assertEq(0, 1); michael@0: } catch(e) { michael@0: c += e; michael@0: } michael@0: } michael@0: assertEq(c, 25);