S12.14_A4.js (889B)
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: Sanity test for "catch(Indetifier) statement" 6 es5id: 12.14_A4 7 description: Checking if deleting an exception fails 8 flags: [noStrict] 9 ---*/ 10 11 // CHECK#1 12 try { 13 throw "catchme"; 14 throw new Test262Error('#1.1: throw "catchme" lead to throwing exception'); 15 } 16 catch (e) { 17 if (delete e){ 18 throw new Test262Error('#1.2: Exception has DontDelete property'); 19 } 20 if (e!=="catchme") { 21 throw new Test262Error('#1.3: Exception === "catchme". Actual: Exception ==='+ e ); 22 } 23 } 24 25 // CHECK#2 26 try { 27 throw "catchme"; 28 throw new Test262Error('#2.1: throw "catchme" lead to throwing exception'); 29 } 30 catch(e){} 31 try{ 32 e; 33 throw new Test262Error('#2.2: Deleting catching exception after ending "catch" block'); 34 } 35 catch(err){} 36 37 reportCompare(0, 0);