SIGN IN SIGN UP
facebook / react UNCLAIMED

The library for web and native user interfaces.

0 0 2 JavaScript

[compiler] Support optional/logical/etc within try/catch (#35606)

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.
J
Joseph Savona committed
b8a6bfa22c8cfc11863f2373fde44ae36695cd0b
Parent: ed4bd54
Committed by GitHub <noreply@github.com> on 2/2/2026, 5:27:05 PM