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
What is work of clr?
How you can implement custom validation in asp.net MVC?
I want to fetch data from datareader. i have three tables in datareader. i want to bind my two table with datagrid, then i want to fetch a value from my third table. do u have any idea pls help me. we use dr.nextresult() for multiple tables.
what is csdl?
what is msl?
What is web api‘s in asp.net mvc 4 ?
What are HTML Helpers, AJAX Helpers in ASP.Net MVC?
What are the new features 3.5 framework against with the tool?
what is deferred loading(lazy loading)?
What is the difference between partial and renderpartial?
Is it possible to create a custom filter?
Explain what is routing?
What is the difference between tempdata and viewbag?
What is renderbody?
What are the Core features of ASP.NET MVC?