[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 523
  • Last Modified:

Handling exceptions in spring framework

Hi Friends,
Recently i went interview for xxx company,they are asked one question on spring i.e
how to handle exceptions in spring framework?and why exception classes in spring are extends RuntimeException class?
0
PrakashVarma
Asked:
PrakashVarma
1 Solution
 
ramumrCommented:
Exception handling in spring can be done using exception resolver. One good read below
http://static.springsource.org/spring/docs/2.0.x/reference/mvc.html

Spring throws runtime exceptions, so that if you do not handle an exception in your code, your application will break and the user gets the application exception and you will be more careful for that not to happen. One good read on that below
http://springtips.blogspot.com/2007/11/runtime-exception-in-spring.html

0
 
reijnemansCommented:
Hi,

Here is also an article which describes why to use checked and why to use unchecked exceptions: http://tutorials.jenkov.com/java-exception-handling/checked-or-unchecked-exceptions.html

Regards,

Reijnemans
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now