Why is it a bad idea to throw your own exceptions?
Answer / 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 |
WHAT IS THE EXACT USE OF INTERFACE(DONT TELL USE FOR MULTIPLE INHERITANCE)
What is a linq in c#?
Do void methods have parameters?
How you will create satellite assemblies?
What is property c#?
What is difference between float and decimal?
What is a sealed class?
Can abstract class be sealed?
What is the difference between a variable and a literal?
What is c# used for in the industry?
How do you inherit from a class in C#?
Explain metadata in c#.