Path: csiph.com!news.redatomik.org!aioe.org!.POSTED!not-for-mail From: "R.Wieser" Newsgroups: microsoft.public.scripting.vbscript Subject: Re: Is there a way to check the state of the error handler? Date: Sat, 19 May 2018 12:15:21 +0200 Organization: Aioe.org NNTP Server Lines: 30 Message-ID: References: <2tcspbxl8haf.1tz7eicrk8vcl.dlg@40tude.net> <16hup5czgwt9h$.qrovq8sry17m.dlg@40tude.net> NNTP-Posting-Host: OLAqPNFqcmhJ7HE1wtUANg.user.gioia.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.3 X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 X-MSMail-Priority: Normal Xref: csiph.com microsoft.public.scripting.vbscript:11954 Evertjan, >> Also, outside of an "catch the error" block the error object seems to be >> rather unuseful: The system than catches it and aborts the script, >> before you are able to access the error object. > > Well, you can test any number of statements after a single 'on error > resume > next' and outut or store the Err.Number. Yep, you could do that. And I'm sure there is a possibility that such a construct will be used by someone somewere. Though I doubt that the contents of ErrNumber4 will be of much interest when the contents of ErrNumber1 have found to be non-zero. And that "just grab the errors, but chug on regardless" approach is quite dangerous when using anything else than the most simple of things (like calculations). So personaly I would try to skip to the end of the "catch" block (using an "early death" OR comparision alike mechanism) when encountering the first error. *Much* safer. :-) But I have to ask, what part of the quoted message did you reply to ? Regards, Rudy Wieser