Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HibernateException is a UncheckedException

 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

From the docs it is mentioned that HibernateException is a UncheckedException is that true??
 
Omar Al Kababji
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HibernateException extends NestableHibernateException which in turn it extends RuntimeException so yes it is an unchecked exception.
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a little bit controversial, but pretty much all the ORM systems use unchecked exceptions.

The advantage of unchecked exceptions is that you don't have to know about and handle every little off-the-wall exception that could possible arise and do so in each and every method that handles it - which is especially important when you're using plug-replaceable components, each with its own unique set of exceptions.

The disadvantage of unchecked exceptions is that you have no explicit indication that something big and nasty might be headed your way.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic