News for hackers. Stuff that matters.
Re:Programming Affordances That Invite Mistakes by Terr_ on Sunday July 13, 2025 @04:44AM (#44548639)
I often find myself wishing for a Checked Exceptions, I think things would have played out differently if there was more syntactic sugar.

Like if one could easily specify that within a certain scope (method or try-block), any of a list of exception classes (checked or unchecked) will become automatically wrapped into a target checked exception class as the chained "cause."

So you could set a policy that EngineBrokenException=or OutOfFuelException bubbling up will become FleetVehicleInoperableException.

There are no comments on this comment yet.