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: * Appearing of "break" within "try/catch" Block yields SyntaxError michael@0: * michael@0: * @path ch12/12.8/S12.8_A8_T2.js michael@0: * @description Checking if using "break Identifier" from within catch Block appears to be invalid michael@0: * @negative michael@0: */ michael@0: michael@0: var x=0,y=0; michael@0: michael@0: try{ michael@0: LABEL1 : do { michael@0: x++; michael@0: throw "gonna leave it"; michael@0: y++; michael@0: } while(0); michael@0: $ERROR('#1: throw "gonna leave it" lead to throwing exception'); michael@0: } catch(e){ michael@0: break; michael@0: LABEL2 : do { michael@0: x++; michael@0: y++; michael@0: } while(0); michael@0: } michael@0: michael@0: