N
Nay Myo Aung
Hi All!
I think I discovered a possible improvement on .NET Framwork's
TRY...CATCH...END TRY statement. I guess most developers might also have
been discovered that at some point in their .NET development process but
continued to ignore the problem due to their workloads.
The word is RETRY.
Consider the following...
Try
'...something
Catch e as FileNotFoundException
'correct the error and then
ReTry
Catch e2 as DirectoryNotFoundException
'correct the error and then
ReTry
Catch e3 as DriveNotFoundException
'correct the error and then
ReTry
Catch '<< catch 'unknown' error
'log the error
Finally
End Try
We .NET programmers could use the keyword RETRY in the any of the Catch
block to re-execute the code in Try block. If there's another exception
thrown, we can evaulate that exception in one of the many Catch blocks until
it reached to the 'unkown' exception.
So, I propose that a new keyword ReTry should be incorporated in the .NET
Framework 2 as an improvement.
Feel free to feedback on the idea...
--
Nay Myo Aung
Chief Visual Software Architect
MCP MCSD MCDBA
Email: owN0SPAMner @naymyoauN0SPAMng.name [remove NOSPAM s]
Homepage: http://hyperdisc.unitec.ac.nz/postgrad/aungn01/
I think I discovered a possible improvement on .NET Framwork's
TRY...CATCH...END TRY statement. I guess most developers might also have
been discovered that at some point in their .NET development process but
continued to ignore the problem due to their workloads.
The word is RETRY.
Consider the following...
Try
'...something
Catch e as FileNotFoundException
'correct the error and then
ReTry
Catch e2 as DirectoryNotFoundException
'correct the error and then
ReTry
Catch e3 as DriveNotFoundException
'correct the error and then
ReTry
Catch '<< catch 'unknown' error
'log the error
Finally
End Try
We .NET programmers could use the keyword RETRY in the any of the Catch
block to re-execute the code in Try block. If there's another exception
thrown, we can evaulate that exception in one of the many Catch blocks until
it reached to the 'unkown' exception.
So, I propose that a new keyword ReTry should be incorporated in the .NET
Framework 2 as an improvement.
Feel free to feedback on the idea...
--
Nay Myo Aung
Chief Visual Software Architect
MCP MCSD MCDBA
Email: owN0SPAMner @naymyoauN0SPAMng.name [remove NOSPAM s]
Homepage: http://hyperdisc.unitec.ac.nz/postgrad/aungn01/