Re: Possible TRY...CATCH...END TRY
From: Nay Myo Aung (noemail_at_noserver.com)
Date: 12/03/04
- Next message: Nay Myo Aung: "Re: Possible TRY...CATCH...END TRY"
- Previous message: Nay Myo Aung: "Re: Possible TRY...CATCH...END TRY"
- In reply to: Robby: "Re: Possible TRY...CATCH...END TRY"
- Next in thread: Elp: "Re: Possible TRY...CATCH...END TRY"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 4 Dec 2004 01:25:27 +1300
Hi Robby,
I hope MS consider this too!
-- 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/ "Robby" <edmund@not.my.email.com> wrote in message news:%23wwHm7R2EHA.1300@TK2MSFTNGP14.phx.gbl... > > This is a great idea!! > > We VB programmers have always had On Error Goto <label> where we could try > to fix the error and go back to the start of the block. While we can > still do this in .Net I prefer not to as I try to use the framework error > handling of Try ... Catch ... End Try. This idea offers some really great > flexibility for handling exceptions. I am surprised that they have not > mentioned anything like this in their .Net briefs. > > If your listening MS, please consider this. > > Robby > > > "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/ >> > >
- Next message: Nay Myo Aung: "Re: Possible TRY...CATCH...END TRY"
- Previous message: Nay Myo Aung: "Re: Possible TRY...CATCH...END TRY"
- In reply to: Robby: "Re: Possible TRY...CATCH...END TRY"
- Next in thread: Elp: "Re: Possible TRY...CATCH...END TRY"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|