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 conceptual model? : Entity framework
what is datacontrols?
What are non action methods in mvc?
How does work clr?
What are the components required to create a route in mvc?
What is session state management?
What is presentation framework?
What is entitytype? : Entity framework
Why is entity framework used?
Which is the root namespace for fundamental types in .net framework?
How can I return string result from action in asp.net mvc?
What are the advantages of asp.net mvc?
What are the versions of .net framework?
will there be any issues adding a table without primary keys to a data model?
what is code first approach?