michael@0: // Copyright 2009 the Sputnik authors. All rights reserved. michael@0: // This code is governed by the BSD license found in the LICENSE file. michael@0: michael@0: /** michael@0: * Using "break" within "try/catch" statement that is nested in a loop is allowed michael@0: * michael@0: * @path ch12/12.8/S12.8_A9_T1.js michael@0: * @description Using "continue Identifier" within "catch" statement michael@0: */ michael@0: michael@0: var x=0,y=0; michael@0: michael@0: (function(){ michael@0: FOR : for(;;){ michael@0: try{ michael@0: x++; michael@0: if(x===10)return; michael@0: throw 1; michael@0: } catch(e){ michael@0: break FOR; michael@0: } michael@0: } michael@0: })(); michael@0: michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#1 michael@0: if (x!==1) { michael@0: $ERROR('#1: break inside of try-catch nested in loop is allowed'); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: