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

Answer Posted / pradeep

Hi Swapna,

throwing our Own Exception does not Means that there is
Design Flaws,

Assume that your application Involves DB Operation,

EG:

It Reads Data from an MSACCESS file,

and you are connecting the D.B through you program,

but can u tell me, what will happen if somebody/some other
application Exclusively opened the Access file before ur
Program,
----------------
A wise Programmer will foresee this Issue, and will Create
his own Exception Handler, which will instruct his User to
close that MSACCESS file,

----

So SWAPNA pls Grow UP, and try to think like how MEN Do,..

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between ref and out in c#?

461


State two different types of access modifiers.

553


Can you declare a field readonly?

534


Is it possible to restrict the scope of a field/method of a class to the classes in the same namespace?

498


What is a thread? What is multithreading?

500






What is an extension method in c#?

485


Is char * null terminated?

513


Explain About DTS package

574


Can constructor be protected in c#?

486


If casting fails what type of exception is thrown?

476


What are the drawbacks of extending an interface as opposed to extending a class?

463


What are the differences between system.string and system.text.stringbuilder classes?

478


What is lock in c#?

484


Can I use ReaderWriterLock instead of Monitor.Enter/Exit for Threading?

501


Why is dll used?

588