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 / mathew m
it will give error
previous catch clause already catches all exceptions of
this or of a super type ('System.Exception')
b"z System.Exception is the MOTHER -"mathaji" of all
exception.So all will be caught intitally,after that no
exception remains...it will be ok if we put child exception
like "SQLQueryException" before Exception [mathaji:)]
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Can I set the unlimited length for "maxjsonlength" property in config?
What are non action methods in mvc?
How route table is created in ASP.NET MVC?
What are authentication filters in web api?
Possible ways to prevent xss attacks on mvc application?
What are the options can be configured in AJAX helpers?
Explain unit test done by tester on development team?
What is difference between html.beginform and ajax.beginform?
What is conceptual model? : Entity framework
What is the difference between entity framework and mvc?
What is representational state transfer (rest) mean?
Explain the advantages of asp.net mvc over asp.net?
mention what are the various methods provided by the dataset object to generate xml?
Can I add asp.net mvc testcases in visual studio express?
What is session state management?