Why is it a bad idea to throw your own exceptions?
Answer / daniel
Well, if at that point you know that an error has occurred,
then why not write the proper code to handle that error
instead of passing a new Exception object to the catch
block? Throwing your own exceptions signifies some design
flaws in the project.
Is This Answer Correct ? | 3 Yes | 2 No |
How do you secure a webservice?
What are the types in c#?
Are arrays immutable c#?
When can a derived class override a base class member?
Is string a class in c#?
ctype(123.34,integer) - should it throw an error? Why or why not?
What are types in c#?
Can two catch blocks be executed?
What is a resource? Provide an example from your recent project.
2 Answers IBM, Logica CMG, Wipro,
What does it mean?
Why do we need interfaces?
What is type safe code?