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
How we can add the css in mvc?
In .net compact framework, can we free memory explicitly without waiting for garbage collector to free the memory?
Is the following route definition a valid route definition? {controller}{action}/{id}
What is partialview 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 a model in android?
Why to use “{resource}.axd/{*pathinfo}” in routing in mvc?
What is the difference between tempdata and viewbag?
Explain Sections is ASP.Net MVC?
Asp.net mvc application, makes use of settings at 2 places for routing to work correctly. What are these 2 places?
What is MVVM design pattern?
What is the difference between windows vista and .net framework 3.0 ?
How we can invoke child actions in ASP.Net MVC?
Explain Bundle.Config in ASP.Net MVC4?
What are Code Blocks in Views?