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

The order of the filters that get executed, if the multiple filters are implemented?

703


What is a model in android?

574


mention what is csdl, ssdl and msl sections in an edmx file?

679


Why to use html.partial in mvc?

810


What is an asynchronous controller in asp.net mvc?

620






What is clr? How does work clr & wht is work of clr?

668


Explain unit test done by tester on development team?

618


What are HTML Helpers, AJAX Helpers in ASP.Net MVC?

660


What is a model in programming?

646


What is edm (entity data model)? : Entity framework

634


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

677


What are the 2 popular asp.net mvc view engines?

634


Is http stateful or stateless?

647


What are the main features of asp.net mvc 4 used by asp.net web api?

637


Explain covariance and contra-variance in .net framework 4.0. Give an example for each.

672