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

How to perform exception handling in Hibernate

 
Rajendra Lella
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is there any way to handle the Exception in the code which we write using Hibernate.

Thanks & Regards,
Rajendra
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure what you are asking here. Exception handling in Hibernate is no different than in normal Java code.
 
Rajendra Lella
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Sturrock wrote:Not sure what you are asking here. Exception handling in Hibernate is no different than in normal Java code.


Hi,
Paul Here I mean like there are some exceptions JDBCConnectionException, SqlGrammerException, ConstraintViolationException.. how can we handle this.

Regards,
Rajendra
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate wraps exceptions into HibernateException s. Well there are a few others, like LayInitiailizationException, NonUniqueObjectException.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic