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 you mean by inner exception in c#?
Is everything an object c#?
Why do we need ienumerable in c#?
Does c# support multiple inheritance (mi)?
What is append in c#?
Explain metadata in c#.
Are arrays immutable c#?
What happens if a static constructor throws an exception?
Why do we use namespace in c#?
What are callback methods in c#?
Explain About sn.exe
Why main is static in c#?
How garbage collection deals with circular references.
What is nullable types in c#?
Can I use ReaderWriterLock instead of Monitor.Enter/Exit for Threading?