OpenJDK company blog

JEP draft: Exception handling in switch

Enhance the switch construct so that exceptions thrown by the selector (the e in switch (e) ... ) can be handled in the switch block. Alongside a previous enhancement to handle null selectors, this makes switch even more useful for pattern matching. This is a preview language feature .
Points
130
HN comments
103
Submissions
1
Cited by
0 commenters

Programming LanguagesSoftware Engineering2024

On Hacker News

SubmittedTitle on HNPointsComments
Apr 19, 2024JEP draft: Exception handling in switch by vips7L130103

More from OpenJDK

All 21 posts →

Related posts from the same era