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

Answers were Sorted based on User's Feedback



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

Answer / subasini

Catch(Exception) is Bad Because Of It supress your Fault in
the coding

Is This Answer Correct ?    4 Yes 2 No

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

Answer / senthilselvan

if you know what kind of error may occur in that block mean
, will it be right to use catch block without handling the
proper validation?

Is This Answer Correct ?    2 Yes 1 No

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

Answer / 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

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

Answer / 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

More ASP.NET Interview Questions

What are the advantages and disadvantages of Using Cookies?

0 Answers   MCN Solutions,


Which is an advantage of application service providers?

0 Answers  


Why session is used in asp.net?

0 Answers  


What is preprocessor in .net? Where it use?

0 Answers  


Define page output caching?

0 Answers  






if i have a web page, and after the postback i dont to maintain the viewstate. How can we maintain in web application?

4 Answers   CGI,


How can u handle Un Managed Code Exceptions in ASP.Net?

1 Answers   Lara Technology,


what are the application layers for a distribute application?

0 Answers   Mind Tree,


You create an ASP.NET application for a hotel. The application contains a page that displays current weather conditions for the city in which the hotel is located. The application calls an XML Web service every 10 minutes to update the current weather conditions. A new page is then displayed for subsequent requests. You want the same page to be cached and retrieved from the cache during the time between calls to the XML Web service. You decide to use a Page directive to accomplish this goal. Which Page directive should you use? A . <%@ Cache Seconds="600 '' VaryByParam="Page" %> B . <%@ OutputCache Time="600" %> C . <%@ OutputCache Duration="600" VaryByParam="None" %> D . <%@ OutputCache Duration="600" %>

2 Answers   Syntax Softtech,


What is the differences between a primary key and a unique key in sql server?

0 Answers  


Why do we use Option Explicit?

2 Answers   Microsoft,


What is round trip in asp.net?

0 Answers  


Categories