Re: Possible TRY...CATCH...END TRY

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Ollie (ollie_riches_at_hotmail.com)
Date: 12/03/04


Date: Fri, 3 Dec 2004 09:53:54 -0000

wouldn't it be the RESPONIBILITY of the caller to sort out the problem and
re-call the method and not group all functionality into one class i.e
encapsulate away certain data\methods ?

Ollie Riches

"Nay Myo Aung" <owNOspaMnerATnaymyoauNOspaMng.name> wrote in message
news:uifBpxR2EHA.3452@TK2MSFTNGP14.phx.gbl...
> 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/
>
>



Relevant Pages

  • Re: Possible TRY...CATCH...END TRY
    ... > The word is RETRY. ... > We .NET programmers could use the keyword RETRY in the any of the Catch ... If there's another exception ...
    (microsoft.public.dotnet.academic)
  • Re: Possible TRY...CATCH...END TRY
    ... > The word is RETRY. ... > We .NET programmers could use the keyword RETRY in the any of the Catch ... If there's another exception ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Possible TRY...CATCH...END TRY
    ... > The word is RETRY. ... > We .NET programmers could use the keyword RETRY in the any of the Catch ... If there's another exception ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Possible TRY...CATCH...END TRY
    ... > The word is RETRY. ... > We .NET programmers could use the keyword RETRY in the any of the Catch ... If there's another exception ...
    (microsoft.public.dotnet.general)
  • Re: Possible TRY...CATCH...END TRY
    ... You should try Eiffel! ... the exception is rethrown automatically if you don't do anything ... being rethrown is to do a RETRY! ... > We .NET programmers could use the keyword RETRY in the any of the Catch ...
    (microsoft.public.dotnet.academic)