Sankar:
Finally blocks should be used for cleanup code and nothing 'risky' should be
done in them. There are so many different things that can gro wrong in an
app it's hard to answer the question in totally general terms, but as a rule
of thumb, trap only exceptions that you are planning on dealing with
specifically (System.Exception == PureEvil unless it's at the root of the
app) and if you trap specific exceptions , then you can rest assured that
you won't throw additional ones in the finally block.
HTH
Bill
"Sankar Nemani" <sn*****@nospamlumedx.com> wrote in message
news:eg**************@TK2MSFTNGP11.phx.gbl...
Hi all,
If there is an exception inside the finally part of the try block,
then the original exception will be lost. Other than making sure the finally
code does not throw any exceptions and/or putting a try-catch (and ignore
exceptions) block around the code in finally, is there any better way to
handle this situation?
TIA
Sankar Nemani