exception

A collection of 2 posts

A Java geek
  • Me
  • Books
  • Speaking
  • Mentions
  • Focus
Aug 31, 2014 design exception spring

Using exceptions when designing an API

Many knows the tradeoff of using exceptions while designing an application: On one hand, using try-catch block nicely segregates between regular code and exception handling codeOn the other hand, using exceptions has a definite performance cost for the JVM Every time I’ve been facing this quandary, I’ve ruled in favor of the former, because 'premature optimization is evil'. However, this week has proved me that exception handling in designing an API is a very serious decision. I&#

Nicolas Fränkel
Jun 9, 2014 design exception

A single simple rule for easier Exception hierarchy design

Each new project usually requires setting up an Exception hierarchy, usually always the same. I will not go into details whether we should extend RuntimeException or directly Exception, or whether the hierarchy roots should be FunctionalException/TechnicalException or TransientException/PersistentException. Those will be rants for another time as my current problem is completely unrelated. The situation is the following: when something bad happens deep in the call layer (i.e. an authenticatio

Nicolas Fränkel
A Java geek © 2008-2025
v. cc175def46a5ea4416d57d241d859e495307e500/9964587441
Latest Posts