• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Handling of Database related exception

 
Ranch Hand
Posts: 83
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to put different level of database exceptions thrown by Spring. I came to know that it is subclasses of DataAccessException.

problem is that how to handle this types of exception. Because depanding on this exception , i want to create logs for that.

If any utility is avilable in spring, tell.

Tell how do i able to log data base related exception thrown by Spring?
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

jagrutkumar dalwadi wrote:I want to put different level of database exceptions thrown by Spring. I came to know that it is subclasses of DataAccessException.

problem is that how to handle this types of exception. Because depanding on this exception , i want to create logs for that.

If any utility is avilable in spring, tell.

Tell how do i able to log data base related exception thrown by Spring?



Just catch the exceptions. They are not checked exceptions, so you just choose if you want to catch them or not. So then just catch them and log them, although that isn't what exception handling is about. You catch exceptions when you want to actually handle them in some way to say re run the request.

Mark
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic