Why is it a bad idea to throw your own exceptions?



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

Post New Answer

More C Sharp Interview Questions

What are the collection types can be used in c#?

0 Answers  


How many constructor can a class have?

0 Answers  


What is a long in c#?

0 Answers  


What do you know about device context?

0 Answers   C DAC,


Is null in c#?

0 Answers  


What is COM Interoperability?

0 Answers   DELL,


What does return do in for loop?

0 Answers  


What is the difference between constants and read-only?

0 Answers  


What is strong name assembly?

0 Answers  


What is iqueryable and ienumerable in c#?

0 Answers  


If you define integer variable and a object variable and a structure then how those will be plotted in memory ?

1 Answers  


What is polymorphism in c sharp?

0 Answers  


Categories