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

Can I set the unlimited length for "maxjsonlength" property in config?

978


What are non action methods in mvc?

988


How route table is created in ASP.NET MVC?

1032


What are authentication filters in web api?

1016


Possible ways to prevent xss attacks on mvc application?

973


What are the options can be configured in AJAX helpers?

966


Explain unit test done by tester on development team?

961


What is difference between html.beginform and ajax.beginform?

959


What is conceptual model? : Entity framework

894


What is the difference between entity framework and mvc?

1010


What is representational state transfer (rest) mean?

946


Explain the advantages of asp.net mvc over asp.net?

1059


mention what are the various methods provided by the dataset object to generate xml?

961


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

1053


What is session state management?

977