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
What is the use of base keyword? Tell me a practical example for base keyword’s usage?
what is difference between is and as operators in c#?
What is predicate builder?
what happens if you inherit multiple interfaces and they have conflicting method names?
What is view state c#?
What is uint c#?
Is a c# interface the same as a c++ abstract class?
What is difference between field and property in c#?
What is hierarchical inheritance in c#?
What is gac? What are the steps to create an assembly and add it to the gac?
Is as keyword in c#?
What is jagged array?
Give some examples of commonly used i/o classes?
List down the commonly used types of exceptions in .net
How to declares a two-dimensional array in C#?