Avoid try/catch hell without going full functional
Recently I’ve been collaborating with a team in a decently large and complex Java codebase with more than a couple of years in production. The codebase has gone through various business changes and has quite a lot of edge cases to consider. Most of the code was done by people that are no longer in the company and. Consequently, defensive programming is quite prevalent. As you might expect, Exceptions are thrown everywhere, and the code is riddled with try/catch blocks where the catch blocks effectively act as if/else statements,
Published on 2024/10/29 by Eric Driussi
Read more