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


Please Help Members By Posting Answers For Below Questions

Can we maintain state in webservice?

739


what is the purpose of using statement in c#

728


What is use of a HashTable in .NET?

902


What is the difference between static and private constructor in c#?

696


What are extender provider components? Explain how to use an extender provider in the project.

670


Why would you use untrusted verification?

708


What is activator c#?

672


Name which controls do not have events?

780


What is an xsd file?

685


Why use a singleton instead of static methods?

635


What is ienumerable and iqueryable?

684


What is difference between float and decimal?

720


What are cookies in c#?

750


How do you implement thread synchronization in c#?

653


What is the and operator in c#?

701