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 is deadlock in c#?
How can you prevent escaping on backslashes in C# with string definitions?
How do you declare a variable in c#?
What is sqlcommandbuilder c#?
Why do we need nullable types in c#?
What are nested classes in c#?
How many types of delegates are there in c#?
What is a console device?
What are Types of assemblies that can be created in dotnet
what is the difference between the debug class and trace class?
How many types of constructors are there?
What do you use c# for?
What are winforms in c#?
What does return do in for loop?
What is data dictionary in c#?