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 is itemrowdatabound for a datagrid?

1 Answers   IBM,


What is a session http?

0 Answers  


What is preprocessor in .net and type, where it use?

0 Answers  


What are Master pages? How to define a Master page?

3 Answers  


How do you turn off cookies for one page in your site?

2 Answers   IBS,


How .Net has implemented security for web applications?

1 Answers  


Write a code snippet to implement the indentation in json in web api.

0 Answers  


Define session in asp.net.

0 Answers  


how can u display multi language (i.e english,spanish...) web site?

2 Answers  


what is use to destroy an object? illustrate.

2 Answers   Patni,


What is difference between view state and session state?

0 Answers  


how many select state ments are used in stored procedure?

8 Answers   CSC,


Categories