Re:Java’s Checked Exceptions Are Evil? (2015)
by pacala on Sunday September 23, 2018 @11:55PM
(#18054903)
Exceptions are for error reporting. Pass them through all the way to the top, and log them. Enforce module preconditions proactively.
[ Parent
| on HN ]
Re:Java’s Checked Exceptions Are Evil? (2015)
by smsm42 on Wednesday September 26, 2018 @02:35PM
(#18078931)
This! Java is hugely overusing exceptions for reporting situations that are completely normal (probably because it didn't have anything like Option type or any way to return error results). Exception should be for "somebody stole our HD and we can't read data" or "database have died and we can't continue, all panic!", not for "user made a typo and we need to display an error message". Using exceptions for routine flow control is bad design.