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

Answer Posted / swapna

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 ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I create a new form in c#?

487


What is difference between constants and readonly in c#?

488


What is difference between a type and class?

604


What is verbatim literal in c#?

491


What is the difference between class and namespace?

492






Is comparable a functional interface?

507


How long will it take to learn c sharp?

502


What is difference between float and integer?

561


Can a static class contain non static members?

556


What is Satellite Assemblies ?

556


Explain the difference between directcast and ctype.

457


What is the extension of c# file?

440


What can I create with c#?

490


What are scriptable objects?

508


What are the examples of data types?

488