Why is it a bad idea to throw your own exceptions?
Answer Posted / guest
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 | 1 No |
Post New Answer View All Answers
Why data types are important?
What are the advantages of clr procedure over t-sql procedure?
What do you mean by parsing and how to parse a date time string in c#?
How many types of inheritance are there in c#?
What is sqlcommandbuilder c#?
Explain the term inheritance in C#.
What is the major difference between a custom control and user control?
What is the difference between finalize() and dispose() methods?
What are the advantages of using partial classes?
What is a callback c#?
Major difference between Basic httpbinding and WShttpbinding?
What is the advantage of dependency injection?
What is extension method in c# and how to use them?
What is data annotation in c#?
Explain the use of virtual, sealed, override, and abstract method?