Code Smell 26 - Exceptions Polluting
It is very nice to have lots of different exceptions. Your code is declarative and robust. Or not?
TL;DR: Don't create anemic and empty objects. Even if they are Exceptions.
Problems
Over Design
Namespace Pollution
Solutions
Avoid creating...
maximilianocontieri.com2 min read
Yonatan Karp-Rudin
Senior Backend Software Engineer
Minor and unrelated to the focus of this post, but using
try-with-resourceswould have simplified the example a lot and made it much clearer what to look at.