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

Does razor engine supports for tdd?

1217


What are the main components of .net framework?

1090


What is the use .glimpse in mvc?

1097


What are ajax helpers in asp.net mvc?

1129


Explain tempdata in mvc?

1044


Describe the roles of clr in .net framework.?

1174


What is the need of Action Filters in ASP.Net MVC

1162


What are Action Methods in ASP.NET MVC?

1179


Explain how you can send the result back in JSON format in MVC?

1030


What are the 3 segments of the default route, that is present in an ASP.NET MVC application?

1130


What is the use of razor view engine?

1016


Can I add asp.net mvc testcases in visual studio express?

1129


What is main objective of asp.net mvc 4 or what is new in mvc4 ?

1197


What is NonActionAttribute ?

1071


What are the components of the .net framework.

1094