Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Hi,
Requirement is:
try
{
\\SQL Query
}
catch(Exception i)
{
print a
}
catch(SQLQueryException e)
{
\\SQL Query
}
Got Exception in "try" block. Which "catch" throws
exception and Why???

Please provide the answer in detail..

Thanks for the help!!!

Answer Posted / syed

The generic exception (Catch(Exception e)) should be
written after all the specific exceptions are written.
if any specific exception is written after the general
exception that will be of no use, as for all the exceptions
that were encountered in the try block will be catched by
the generic exception.
hope u got it.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to manage pagination in a page using .net?

1000


Explain how to stop a thread?

1046


Please explain is the jit an interpreter?

1156


What is the use of UML in .Net

1079


Explain cas (code access security)?

1048


Explain the procedure to add assemly to gac to make it shared one?

978


What is dot net and its uses?

1001


Explain the main components in .net?

1065


Explain what is an anonymous method and how is it different from a lambda expression?

961


What are data types in .NET?

1153


Explain Creational design pattern in .NET?

1071


What's the .net collection class that allows an element to be accessed using a unique key?

1021


What is static constructor, when it will be fired?

1044


How do I use the thread pool?

1032


What is interface and abstract class in .net?

1032