optional-catch-binding-throws.js (603B)
1 // Copyright (C) 2017 Lucas Azzola. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 author: Lucas Azzola 6 esid: pending 7 description: errors can be thrown from catch clause without binding 8 features: [optional-catch-binding] 9 info: | 10 Runtime Semantics: CatchClauseEvaluation 11 12 Catch : catch Block 13 (...) 14 Let B be the result of evaluating Block. 15 (...) 16 Return Completion(B). 17 ---*/ 18 19 assert.throws(Test262Error, function() { 20 try { 21 throw new Error(); 22 } catch { 23 throw new Test262Error(); 24 } 25 }); 26 27 reportCompare(0, 0);