ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  C Sharp
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
Why is it a bad idea to throw your own exceptions?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Why is it a bad idea to throw your own exceptions?
Answer
# 1
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 ?    0 Yes 1 No
Swapna
 
  Re: Why is it a bad idea to throw your own exceptions?
Answer
# 2
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 ?    1 Yes 0 No
Pradeep
 
 
 

 
 
 
Other C Sharp Interview Questions
 
  Question Asked @ Answers
 
What does the term immutable mean? Techno-Labs2
Is string reference type / value type? Accenture33
What namespaces are necessary to create a localized application?  1
Is XML case-sensitive?  2
What?s the advantage of using System.Text.StringBuilder over System.String?  1
What is stack and heap? Wipro4
localization using windows c#  2
what is garbage collection? Protech6
Difference between direct type casting and using "as" keyword? TCS1
Why is it a bad idea to throw your own exceptions?  3
Is array reference type / value type? Accenture6
Which type of variables are under the control of garbage collector? Kanbay3
How do you create multiple inheritance in C#? Microsoft3
Difference between multi-level and multiple inheritance? Microsoft3
what is an internal specifier? what happens internally when I use access specifier Internal ? rsystems2
f i give input like 1,1,4,5,6,1,2,5,4,1,2, then output should be like : 1-4, 2-2, 4-2, 5-1, 6-1 which means 1 occurs 4 times, 2 occurs 2 times like so.  2
Can an Assembly have multiple versions TCS9
What is a private constructor? where will you use it? Fulcrum-Logic3
What?s a multicast delegate? Visual-Soft2
C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write? Visual-Soft1
 
For more C Sharp Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com