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 selector c#?
What is string in c# net?
What do you mean by synchronous and asynchronous operations?
What is the purpose of abstract class in c#?
What is cookies in c# asp net?
How long does it take to get a loop recorder put in?
What is use of singleton class in c#?
Which compiler switch creates an xml file from xml comments in the files in an assembly?
Why abstract class can not be instantiated?
Explain About .NET Framework
Is struct object oriented?
What’s thread.sleep() in threading ?
What is lazy loading entity framework?
What is difference between a constant and read-only in C#?
What is the object class in c#?