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.