Re: Wondering what you think about snippets like these?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Al Dunbar" <AlanDrub@xxxxxxxxxxxxxxxxxxx> wrote in message
news:#BlW1Zh$HHA.4584@xxxxxxxxxxxxxxxxxxxxxxx

[snip]

With using "On Error Resume Next" you can't detect errors by
testing the "Err" object.

Erm, isn't that precisely why the statement exists - so that the error
does
not abort the script before it gets to our code for testing the result?

[snip]

Not sure what you're suggesting.

The OP did not use "On Error Resume Next" but was testing the
Err object in the "Function GetErrorInfo".

From the VBScript documentation:

On Error Statement
Description:

Enables or disables error-handling.

Remarks

If you don't use an On Error Resume Next statement anywhere in your code,
any run-time error that occurs can cause an error message to be displayed
and code execution stopped.


.



Relevant Pages

  • Re: Wondering what you think about snippets like these?
    ... Erm, isn't that precisely why the statement exists - so that the error ... Err object in the "Function GetErrorInfo". ... Mind you, this is perhaps one area where the use of functions can complicate ...
    (microsoft.public.scripting.vbscript)
  • Re: How many companies are buying new AS400s
    ... Erm, how do you reconcile "I copied about 300 GB of data in the form ... (err, files) ... What size dataset did your query really use? ...
    (comp.sys.ibm.as400.misc)
  • Re: First Lions replacement required
    ... , Cooper, Cuisiter (erm err?) ... Cusiter it is then! ...
    (rec.sport.rugby.union)
  • Re: Wondering what you think about snippets like these?
    ... Erm, isn't that precisely why the statement exists - so that the error ... Err object in the "Function GetErrorInfo". ... not noticing that you actually meant to say: ...
    (microsoft.public.scripting.vbscript)
  • Re: fortran reading a line
    ... (I would put either END= or ERR= on, or it likely fail in other ways.) ... which will usually be an error message. ... Detecting and ignoring EOF is likely worse than the system ... but not knowing the reason for the suggestion, ...
    (comp.lang.fortran)