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...


Requirement is:

try
{
\\SQL Query
}
catch(Exception i)
{
print a
}
catch(SQLQueryException e)
{
\\SQL Query
}


Qu)I Got Exception in "try" block. Which "catch" statement
(i.e. 1st catch or 2nd catch ) catches the exception and
Why???

Answer Posted / mathew m

it will give error

previous catch clause already catches all exceptions of
this or of a super type ('System.Exception')

b"z System.Exception is the MOTHER -"mathaji" of all
exception.So all will be caught intitally,after that no
exception remains...it will be ok if we put child exception
like "SQLQueryException" before Exception [mathaji:)]

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is ssdl?

1160


List out few different return types of a controller action method?

1051


What is object service? : Entity framework

1181


What is Attribute Routing in ASP.Net MVC?

1102


What are the difference between asynchronous controller implementation between asp.net mvc 3 & asp.net mvc 4?

1107


what is entityclient?

1134


What are action filters?

1041


What is viewdata?

1037


Is dapper better than entity framework?

981


what is entity framework?

1086


What happens when I install the .net framework 3.0? How can I upgrade if I already have the .net framework 2.0 installed?

984


what is linq to entities?

1139


How does the .net framework 3.0 relate to windows vista?

1021


Explain the difference between viewbag and viewdata in mvc?

975


What are the major improvements provided by the common language runtime and the base class libraries? Or what are the major improvements in .net framework 4.0?

995