JAVING
Feb 16, 2022

--

Haha.. Thanks for your comment :) Exceptions are unavoidable, in every code base there are some. Not being fan of them doesn't mean I don't use them, just i don't really like them so much. In the context of this article I mean that i prefer the solution with Optional rather than throwing an exception. I use exceptions like everyone, I have to. But what I don't like about them is:

- sometimes in some teams there's an overuse of them to control logical flow(things that are not exceptional)

- the check ones add boilerplate to the code.

I agree with you checked exceptions didn't work the way we hoped. I think i like them the least but there are a couple of interesting tools when working with them, for example try with resources(since Java 7) and sneakyThrows(project lombok)

--

--

JAVING
JAVING

Written by JAVING

The present continuous form of “to program in Java”.

No responses yet