Hi,
Requirement is:
try
{
\\SQL Query
}
catch(Exception i)
{
print a
}
catch(SQLQueryException e)
{
\\SQL Query
}
Got Exception in "try" block. Which "catch" throws
exception and Why???
Please provide the answer in detail..
Thanks for the help!!!
Answer Posted / syed
The generic exception (Catch(Exception e)) should be
written after all the specific exceptions are written.
if any specific exception is written after the general
exception that will be of no use, as for all the exceptions
that were encountered in the try block will be catched by
the generic exception.
hope u got it.
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Tell us why do we use the “using” statement?
What is the new three features of COM+ services, which are not there in COM (MTS)
Explain the difference between constants and read-only variables?
What is managed code and managed data in .net?
Is .net is a language?
What are the differences between an interface and an abstract class in .net?
What is the native image generator?
Is .net core managed code?
How do you define the lease of the object in .net?
If I am writing in a language like vb or c++, what are the procedures to be followed to support .net?
What are the features of dot net?
What is difference between static page and dynamic page?
Explain .net framework overview?
Why inheritance is important?
What is the difference between reference type and value type?