Thoughts on current error handling best practice with VBScript



Hi:

While confused that I wasn't getting runtiime error messages when I
tried to write to files with invalid paths, I poked around see that
error handling is generally absent in vbscript. Since I make so few
errors in my programs, this has never been an issue for me....not.

Is there a document somewhere describing best practice with regard to
error handling in vbscript? With regard to defensive programming
practices that should be observed.

Finally, in self protection against writing to files/folders that
don't exist, it looks like I'll be wrapping the write statements in
fso.FolderExists(sPathspec) tests. Is that about right?

Thanks in advance for any comments you might want to volunteer.

-- Roy Zider
.



Relevant Pages

  • Re: Thoughts on current error handling best practice with VBScript
    ... error handling is generally absent in vbscript. ... Is there a document somewhere describing best practice with regard to ... Yes its generally good practice to avoid using errors to run exceptional ... As to general defensive programming, IMO if that is important to you stop ...
    (microsoft.public.scripting.vbscript)
  • Re: .NET haters ought to get a kick out of this
    ... What is considered "good practice" often changes. ... Just as in VB6 - error handling is usually reserved for the highest ... .NET apps are not slow - and least no slow enough to matter for the ...
    (microsoft.public.vb.general.discussion)
  • Re: C# Error handling
    ... My personal opinion is that doing the latter makes for more readable and ... > and passing them back up through the chain and exiting the App in its ... >> It seems to be bad practice. ... >> Is a better way to set a flag within the Error handling class, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: C# Error handling
    ... need any GUI, I just couldn't see the wood for the trees 8-) ... passing them back up through the chain and exiting the App in its natural ... > It seems to be bad practice. ... > the error handling is nested quite deeply and passing this back to the top ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Trying to avoid "Bad Programming" - please help
    ... I'm no expert in good practice/bad practice. ... As far as a connection, it's my understanding that leaving a persistent open ... I would probably have separate modules for error handling, record handling, ... I would also like to build a single error handling routine that will insert ...
    (microsoft.public.access.modulesdaovba)

Loading