Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.scripting.vbscript > #11949

Re: Is there a way to check the state of the error handler?

From "Mayayana" <mayayana@invalid.nospam>
Newsgroups microsoft.public.scripting.vbscript
Subject Re: Is there a way to check the state of the error handler?
Date 2018-05-18 15:12 -0400
Organization A noiseless patient Spider
Message-ID <pdn8kf$ke5$1@dont-email.me> (permalink)
References (4 earlier) <pdh8ia$8kl$1@dont-email.me> <pdhj6l$1pka$1@gioia.aioe.org> <16hup5czgwt9h$.qrovq8sry17m.dlg@40tude.net> <pdn1uc$8mu$1@dont-email.me> <pdn592$uk0$1@gioia.aioe.org>

Show all headers | View raw


"R.Wieser" <address@not.available> wrote

| Also, is there *any* situation in which the "On Error GoTo 0" actually 
does
| raise an error (related to the contents of the error object) ?

  It cancels On Error Resume Next, thus restoring default
behavior of stopping execution on errors. It's only relevant
to cancel On Error Resume Next, so it wouldn't raise
an error. It's saying, "From here on, stop execution if
there's an error." Thus, the only logical way for it to
work is to clear the error object.

   Why is this topic getting so complicated? Maybe
we're all just bored for lack of real topics to discuss.

  I think the way MS describes it confuses things. On
Error GoTo 0 doesn't "disable error handling". It restores
the default behavior of stopping execution on errors.

   On Error....  clears any error. Err.Clear clears any
error. It's not a philosophical issue.

  Personally I never use On Error GoTo 0. I don't think
stopping execution is ever relevant outside of debugging.
At the very least, the process can do something
like show a message that there was an unknown
error, and maybe take a guess at what it might have
been. By the time code is finished, there should be
virtually no errors that haven't been planned
for. Most possible problems can be anticipated. The
ones that can't are usually obvious. For instance, if
someone unplugs a drive while my script is trying to
read from it then their mistake will be obvious. It's
not an error in the script execution. 

Back to microsoft.public.scripting.vbscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Is there a way to check the state of the error handler? JJ <jj4public@vfemail.net> - 2018-05-15 13:04 +0700
  Re: Is there a way to check the state of the error handler? "Auric__" <not.my.real@email.address> - 2018-05-15 06:55 +0000
    Re: Is there a way to check the state of the error handler? JJ <jj4public@vfemail.net> - 2018-05-15 22:10 +0700
  Re: Is there a way to check the state of the error handler? "Mayayana" <mayayana@invalid.nospam> - 2018-05-15 09:14 -0400
    Re: Is there a way to check the state of the error handler? JJ <jj4public@vfemail.net> - 2018-05-15 22:22 +0700
      Re: Is there a way to check the state of the error handler? "Mayayana" <mayayana@invalid.nospam> - 2018-05-15 11:53 -0400
  Re: Is there a way to check the state of the error handler? "R.Wieser" <address@not.available> - 2018-05-15 17:26 +0200
    Re: Is there a way to check the state of the error handler? JJ <jj4public@vfemail.net> - 2018-05-16 16:52 +0700
      Re: Is there a way to check the state of the error handler? "R.Wieser" <address@not.available> - 2018-05-16 12:42 +0200
        Re: Is there a way to check the state of the error handler? "Mayayana" <mayayana@invalid.nospam> - 2018-05-16 08:34 -0400
          Re: Is there a way to check the state of the error handler? "R.Wieser" <address@not.available> - 2018-05-16 17:36 +0200
            Re: Is there a way to check the state of the error handler? JJ <jj4public@vfemail.net> - 2018-05-19 00:03 +0700
              Re: Is there a way to check the state of the error handler? "Mayayana" <mayayana@invalid.nospam> - 2018-05-18 13:18 -0400
                Re: Is there a way to check the state of the error handler? "R.Wieser" <address@not.available> - 2018-05-18 20:15 +0200
                Re: Is there a way to check the state of the error handler? "Mayayana" <mayayana@invalid.nospam> - 2018-05-18 15:12 -0400
                Re: Is there a way to check the state of the error handler? "R.Wieser" <address@not.available> - 2018-05-19 11:23 +0200
                Re: Is there a way to check the state of the error handler? "Mayayana" <mayayana@invalid.nospam> - 2018-05-19 10:28 -0400
                Re: Is there a way to check the state of the error handler? "R.Wieser" <address@not.available> - 2018-05-19 22:19 +0200
              Re: Is there a way to check the state of the error handler? "R.Wieser" <address@not.available> - 2018-05-18 20:06 +0200
                Re: Is there a way to check the state of the error handler? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-05-18 23:27 +0200
                Re: Is there a way to check the state of the error handler? "R.Wieser" <address@not.available> - 2018-05-19 12:15 +0200
                Re: Is there a way to check the state of the error handler? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-05-19 21:30 +0200
                Re: Is there a way to check the state of the error handler? "R.Wieser" <address@not.available> - 2018-05-19 22:21 +0200
                Re: Is there a way to check the state of the error handler? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-05-19 22:32 +0200
                Re: Is there a way to check the state of the error handler? "R.Wieser" <address@not.available> - 2018-05-20 11:06 +0200
                Re: Is there a way to check the state of the error handler? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-05-20 12:09 +0200

csiph-web