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

What is Event - Delegate? clear syntax for writing a event delegate

2029


How to manage pagination in a page using .net?

1007


Different levels of priority provided by .net.

1157


Explain the difference between .net 2000 and .net 2005(features)? Which one is better?

1022


What is Code group in .Net with respect to CAS

2075


How do you instantiate a complex number?

1083


What is close method? How its different from finalize and dispose?

1013


What is file extension of Webservices in .Net?

1085


What is the purpose of IClonable interface in .NET?

1055


What is meant by globalization and localization?

1055


Explain about .NET services?

1074


What is .net technology?

1042


Tell us why do we use the “using” statement?

1020


What is the difference between reference type and value type?

939


i m fresher,hav SQL knowledge but in my ofc. i hav to work on dotnet. so plz tell me how to learn it,? from where to stat? i hav C prog. knowledge, ASP.net

2608