S12.14_A11_T1.js (512B)
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: | 6 Using "try" with "catch" or "finally" statement within/without a "for" 7 statement 8 es5id: 12.14_A11_T1 9 description: Loop inside try Block, where throw exception 10 ---*/ 11 12 // CHECK#1 13 try{ 14 for(var i=0;i<10;i++){ 15 if(i===5) throw i; 16 } 17 } 18 catch(e){ 19 if(e!==5)throw new Test262Error('#1: Exception === 5. Actual: Exception ==='+ e ); 20 } 21 22 reportCompare(0, 0);