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: * Sanity test for "catch(Indetifier) statement" michael@0: * michael@0: * @path ch12/12.14/S12.14_A4.js michael@0: * @description Checking if deleting an exception fails michael@0: * @noStrict michael@0: */ michael@0: michael@0: // CHECK#1 michael@0: try { michael@0: throw "catchme"; michael@0: $ERROR('#1.1: throw "catchme" lead to throwing exception'); michael@0: } michael@0: catch (e) { michael@0: if (delete e){ michael@0: $ERROR('#1.2: Exception has DontDelete property'); michael@0: } michael@0: if (e!=="catchme") { michael@0: $ERROR('#1.3: Exception === "catchme". Actual: Exception ==='+ e ); michael@0: } michael@0: } michael@0: michael@0: // CHECK#2 michael@0: try { michael@0: throw "catchme"; michael@0: $ERROR('#2.1: throw "catchme" lead to throwing exception'); michael@0: } michael@0: catch(e){} michael@0: try{ michael@0: e; michael@0: $ERROR('#2.2: Deleting catching exception after ending "catch" block'); michael@0: } michael@0: catch(err){} michael@0: