S12.7_A9_T1.js (743B)
1 // Copyright 2009 the Sputnik authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 info: Continue inside of try-catch nested in a loop is allowed 6 es5id: 12.7_A9_T1 7 description: > 8 Using "continue Identifier" within catch Block that is within a 9 loop 10 ---*/ 11 12 var x=0,y=0; 13 14 (function(){ 15 FOR : for(;;){ 16 try{ 17 x++; 18 if(x===10)return; 19 throw 1; 20 } catch(e){ 21 continue FOR; 22 } 23 } 24 })(); 25 26 ////////////////////////////////////////////////////////////////////////////// 27 //CHECK#1 28 if (x!==10) { 29 throw new Test262Error('#1: Continue inside of try-catch nested in loop is allowed'); 30 } 31 // 32 ////////////////////////////////////////////////////////////////////////////// 33 34 reportCompare(0, 0);