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 .exe means?
Is namespace necessary in c#?
How to find Percentage, name ,College from a resume or document ? How to export these values to other page in C#?
What is a event in c#?
Define satellite Assembly?
Do unused Namespaces in c# affect run-time performance?
How assembly versioning in .NET prevent DLL Hell problem?
Define an escape sequence, name few strings in escape sequence?
How many types of collections are there in c#?
What are the benefits of using windows services:
How main method is called in c#?
Why is lazy loading?
What does console writeline do?
What is private class in c#?
What is fcl in c#?