mirror of
https://github.com/facebook/react.git
synced 2026-02-21 19:31:52 +00:00
Adds support for value terminals (optional/logical/ternary/sequence) within try/catch clauses. Try/catch expressions insert maybe-throw terminals after each instruction, but BuildReactiveFunction's value block extraction was not expecting these terminals. The fix is to roughly treat maybe-throw similarly to goto, falling through to the continuation block, but there are a few edge cases to handle. I've also added extensive tests, including testing that errors correctly flow to the catch handler.