Why is catch(Exception) almost always a bad idea?

Answer Posted / nagaraj

Catch(Exception) means that you catch all the exception
which might not occur. But, really we need to catch only
some type of exception, so we need to catch only those type
instead of catching all the exceptions.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is GAC in ASP.NET 2.0

581


If you want to bind the columns manually within the asp:datagrid tags what kind of tags you have to add.

616


What are the types of authentication in asp.net?

548


Can any body provide me the sample web application in asp.net

1434


What is a 1x1 pixel?

528






Describe session handling in a webfarm, how does it work and what are the limits?

576


How to display Alert in ASP.NET

639


What are the navigation ways between pages available in ASP.NET?

564


What are server-side comments in ASP.NET?

542


Explain different types of Caching techniques in ASP.NET?

548


Why is it preferred to not use finalize for clean up?

558


Define static member?

531


What is active web page?

561


Define tracing.

622


What is a windows service?

553