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

Answer Posted / anna

it's not the bad idea of using catch exception.
catch exception catches all the exceptions in try block.
if we use these blocks, we will be able to know where the
exact error is.
if we use one try block, we must use the catch block .

Is This Answer Correct ?    6 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give an example of what might be best suited to place in the application_start and session_start subroutines?

518


What are demand-paging and pre-paging?

572


What are type/key pairs in client script registration?

558


What is simple data binding?

512


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

563






Explain http handlers? Where we can use the http handlers?

681


What are sql notifications and sql invalidations?

525


What are the different methods of session maintenance in asp.net?

526


What is data cache in sql server?

584


Which library is used by the testers and developers to develop automated tests and create testing tools?

538


What is clr? Difference between clr & cts?

682


Explain the concept of event bubbling in ASP.NET?

576


What is the use of execute non query in asp.net?

481


What is the life-span of the items in the viewstate?

493


What is the difference between file-based dependency and key-based dependency?

564