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

The First Catch block will be executed, if the generic
exception should be defined it should be the last of
exception list

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is use of entity container?

828


What is layout in mvc?

790


Explain the .net framework.

762


What are scaffold templates in mvc?

789


What is the difference between tempdata and viewbag?

723


What is entity sql? : Entity framework

768


What is Differnce between html.action and ajax.action?

781


What type of filter does outputcacheattribute class represents?

918


How large is the .net framework 3.0?

791


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

803


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

827


Is it possible to share a view across multiple controllers?

771


What is the difference between model view and controller?

695


how do you truncate a table using entity data model?

861


what is use of entitydatasource control?

875