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

it will give compile time error as, the sequence of
exception class has to be Most Specific => General.

Is This Answer Correct ?    12 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is rxjava used for?

656


I have 2+ years of fake experience,actually i could not answer for project questions..?how can i answer please suggest me..?

2644


What is stateless model?

507


If I have multiple filters implemented, what is the order in which these filters get executed?

520


What is the role of the jit compiler in .net framework?

621






How the ‘page lifecycle’ of ASP.Net MVC does works?

588


What is the difference between tempdata and viewbag?

495


what is entityclient?

679


What is asp net framework?

507


explain how you can load related entities in ef (entity framework)?

538


What is ado.net data provider? : Entity framework

562


What is web api‘s in asp.net mvc 4 ?

580


Which .net framework is installed?

502


What is entity framework used for?

518


Explain the role of assembly in the .net framework.

564