The best way for handling exception when dealing with a database connection?

Question:The best way for handling exception when dealing with a database connection?

1. Implement a try / catch block that catches System.Exceptions.

2. Implementing custom error page.

3. Implement a try / catch block that catches individual exception types, such as SQLException.

4.Display an error message.


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!