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

What is the use of dll file in c#?

557


What are the Types of configuration files and their differences

641


What is an assembly in dotnet?

617


How many types of polymorphism are there?

598


Helo , Help Me , Help Me About : C# Windows Application - Network How To Manage IP Client's Accessiblity To The Internet Share concise Substitute , Minor ISA Server

1550






What is yield keyword?

579


What is a scope in c#?

564


What are logical operators in c#?

613


What is the lock statement in c#?

628


Differentiate between copy and default constructor.

668


Why we use get and set method in c#?

578


What do you mean by thread safe in c#?

546


What is Event - Delegate?

660


Is c# the same as d flat?

595


Can a dictionary have the same key?

596