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

Can we overload indexer in c#?

0 Answers  


Is linkedhashset synchronized?

0 Answers  


Is null empty or whitespace c#?

0 Answers  


How does dll hell solve in .net?

0 Answers  


What is the use of flag in c#?

0 Answers  






If multiple interfaces are inherited and they have conflicting method names; What will happen ?

0 Answers   Siebel,


What does question mark mean in c#?

0 Answers  


What is callback delegate in c#?

0 Answers  


What is Dispose method in .NET ?

9 Answers   247Customer, KAP, TCS,


What are the types of assembly available

0 Answers  


Is array reference type / value type ?

6 Answers   Accenture, BirlaSoft,


How can an inner class access the members of outer class?

0 Answers   Changepond,


Categories