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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is new method in c#?

693


why delegate is type safe?

2789


What is xor operation?

715


write program in c# using this instructions name avinash varma ,work experiance<2,nochildren his work experiance is higher than 5 years,more than one children one children name is diwakar,number of years of work eperiance at current company is the ratio of children and work experiance is 0.21 to 0.5

2073


What is firstordefault c#?

734


What is console readkey in vb net?

864


What all details the assembly manifest will contain?

632


How do you pronounce c#?

698


Why do canadians say zed?

786


what is the difference between a struct and a class in c#?

800


Explain manifest & metadata in c#.

748


In the page load event I assigned dropdownlist’s datasource property to a valid list. On the submit button click.. The same datasource property is coming as null. Why?

677


what are the contents of an assembly ?

765


What are the boolean data types in c#?

698


Is string immutable in c#?

777