I have been developing a web app in Spring + hibernate for last few months. What I have been seriously missing is exception handling.
I want to know the best approaches and Practices to handle exception? I have some questions in my mind which could not be covering all aspects of exception handling like:
1.Whether to make checked or unchecked Exception?How to decide?
2.How to handle and what to do with the exceptions generated in the Controller.
3.What about exceptions which are generated in Service layer and DAO layer?should they be handled in that layer only or should it be transferred to controller layer?
4.Since there are could be numerous exceptions,how could I be prepared to handle those which could come in future?
5.How can I display relevant messages to UI or browser?
Please suggest or provide links to good blogs?