Implement Tier 1 Test262 harness requirements for exception handling: parser (ThrowStmt, TryStmt with boxed data), interpreter (two-level propagation via StmtResult::Throw and RuntimeError::Thrown), catchable vs non-catchable error distinction, scope-safe catch parameter binding, and full finally semantics. Adds expect_property_name so keywords work after dot (e.g. Promise.catch). Includes 85 new unit tests, 5 JS262 conformance fixtures, and updated documentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4 lines
92 B
JavaScript
4 lines
92 B
JavaScript
var caught = false;
|
|
try { throw "error"; } catch(e) { caught = true; }
|
|
console.log(caught);
|