Why is catch(Exception) almost always a bad idea?
Answers were Sorted based on User's Feedback
Answer / subasini
Catch(Exception) is Bad Because Of It supress your Fault in
the coding
| Is This Answer Correct ? | 4 Yes | 2 No |
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 |
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 |
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 |
Are cookies stored on server or client?
Using shadow variable is good or bad for application?
How many view state can be hold by a aspx page ?
Differentiate between file-based dependency and key-based dependency.
i want to develope a page for online test using asp.net with c#.net. so, how to insert the questions in the database sqlserver2000 and how to pick the questions randomly when user login for test. plz send the code for this....
3 Answers Chaitanya, Crysalis, CTS, HCL, Sein Infotech, TCS,
what is a .xap file? Explain with an example.
What is difference between or and orelse?
what is the difference between assemblyinfo and webconfig files?
Can we have multiple web config files for an asp.net application?
Differentiate between globalization and localization.
Describe the .net base class library.
Any disadvantages in Dataset and in reflection ?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)