Why is it a bad idea to throw your own exceptions?
Answer Posted / 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 |
Post New Answer View All Answers
What do you mean by shared assembly?
What is data quality assurance?
What is boxing & unboxing?
Why singleton pattern is used in c#?
i want o/p 011242110 in c# code.
What is view model in c#?
Why is it efficient to use System.string under System.Text.StringBuilder ?
Why is lazy loading?
When is a class declared as a class abstract?
What is interface used in c#?
What is the difference between field and variable in c#?
Why do we need a singleton class?
Can you declare struct members as protected?
What is the difference between User controls and Custom Controls?
What is the keyword used to prevent a class from being inherited by another class?