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 preprocessor in .net? Where it use?

613


What is view state management in asp net?

559


Difference between response.redirect and server.transfer?

639


Is asp.net different from asp? If yes, explain how?

592


How much is the pay-for-use service if I chose not to use microsoft-sponsored advertising?

605






In asp.net, how can you validate drop down box?

688


What is the difference between session and viewstate in asp.net?

697


What is full trust in asp.net?

636


What is the importance of aspnet_isapi.dll, inetinfo.exe andaspnet_wp.exe in the page loading process.

674


For which does this Codebehind="MyCode.aspx.cs" is relevent to ?

678


What is AutoPostback?

691


How can u deifne the benefits and limitation of using Viewstate for state management?

794


List the advantages and disadvantages of user control an custom control?

621


What is asp.net and ado net?

635


Give a few examples of page life cycle events.

764