| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…ly handle returns and re-throws (test): - enable previously skipped re-throw tests - add tests for complex try-catch-finally return and throw scenarios
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… tryCall Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract duplicated return-if-has-return-or-error into a module-level helper. Expand the elseBranch ternary into an explicit if/else with comments for each case (non-empty catch, no catch, empty catch). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Summary
The previous sync try/catch implementation had a fundamental issue: the catch block was not wrapped in pcall, so if catch itself threw an error, it would bypass the finally block and propagate as an unhandled Lua error instead of being re-thrown after finally completes — diverging from JavaScript semantics.
Fixing this required rewriting the sync transformTryStatement to:
This unified architecture also simplifies adding break/continue support inside try/catch (see follow-up PR).