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