Implement exception handling in java-slang#96
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for compiling try-catch-finally statements, refactors the JVM's ExceptionTable to be iterable and use a dedicated class structure, and adds unit tests for exception routing. It also fixes a buffer offset calculation bug in the disassembler when reading code attributes. The reviewer identified several critical bugs in the TryStatement code generation implementation—including a pass-by-value bug with unresolved label offsets, an early return bug when catches are absent but a finally block is present, and incorrect execution paths for finally blocks—and provided a comprehensive rewrite to address these issues.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success1135 tests passing in 64 suites. Report generated by 🧪jest coverage report action from b7a4b18 |
Implement exception handling for the following components (in progress):