Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate 3 version RuntimeExceptions

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi ,

In Hibernate 3 the Framework changed CheckedExceptions to RuntimeExceptions.

But anybody please tell me what is the reason for doing so as my question is that , It will be always better to deal with the Exceptions rather than leaving them unhandled

Thanks in advance .
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Everyone was just catching the exception and then rethrowing it to another layer. That's a waste. They just made it an unchecked exception, and then any layer that wants to handle it can.

It's a much more sound approach, and it's a pattern that is becomming more and more accepted throughtout the Java community, not just Hibernate and JPA.

-Cameron McKenzie
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic