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
Explain what relationship is between a process, application domain, and application?
Tell us what is a variable of implicit type and what is its scope?
What is a variable of implicit type and what is its scope?
Explain about .net assemblies?
Tell us the difference between managed and unmanaged code?
Explain what are the deferred execution and the immediate execution in linq?
Do you know what is linq?
explain the states of a window service application?
What are the differences between user control and server control?
How can I tell if .net 3.5 is installed?
What does il do?
What is the purpose of enumerable class in .net?
What is alias ? Is it used in .Net ?
What does cil do?
Is .net core free?