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 / sathish

There will be compile time error, becuase
the "..........catch(Exception ex)..........." is generic
exception block, where all type of exceptions are caught,
so when "catch(Exception ex)" is placed in the beginning,
then the following compile time error is thrown.

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

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible to combine asp.net webforms and asp.mvc and develop a single web application?

946


What is Layout in ASP.Net MVC?

1016


Explain tempdata in mvc?

940


Difference between ASP.NET MVC and ASP.NET WebForms?

1014


Describe the .net framework architecture.

1016


Explain dependency resolution?

1020


Explain the .net framework.

948


What are the components of the .net framework.

998


What is Dependency Injection in ASP.Net MVC

1010


What is edm in entity framework?

935


How does work clr?

860


what do you mean by navigation property?

999


Can I remove .net framework?

936


What is poco proxy? : Entity framework

1007


If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why?

2513