Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.scripting.vbscript > #11936
| 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-15 09:14 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <pdemhb$39e$1@dont-email.me> (permalink) |
| References | <2tcspbxl8haf.1tz7eicrk8vcl.dlg@40tude.net> |
"JJ" <jj4public@vfemail.net> wrote
| i.e. the state which is affected by these statements:
|
| On Error Resume Next 'disable error handling
| On Error Goto 0 'enable error handling
I think you meant those the other way around.
GoTo 0 to disable error handling. But it's an
understandable mistake. The way the help describes
it is confusing, like a multiple negative statement.
The system is "handling" errors all the time. It's just
a matter of whether you want to stop execution on
errors or manage the next step yourself. Allowing
execution to be stopped is also a way of handling the
error.
'-------------------------------
Err.Clear '-- Not necessary, since the script just started.
'Also because an On Error line is supposed to clear
' the error record. Though personally I avoid trusting
'that.
On Error Resume Next
x = 5 \ 0
If Err.Number <> 0 Then
MsgBox Err.Number & vbCrLf & Err.Description
End If
'---------------------------------
Either way, the script shows the error.
But to your question....
How do you arrive at a point where you
don't know how you've left it? I can't see that.
But if you do, it's easy enough to just add the
"On Error" line of your choice.
Back to microsoft.public.scripting.vbscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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