Article View: news.software.readers
Article #42753Re: [slrn] Preventing an S-Lang macro from aborting.
From: blue... Dawn Owens-Nicholson
Date: Sun, 16 Aug 1998 00:00
Date: Sun, 16 Aug 1998 00:00
32 lines
1641 bytes
1641 bytes
Lloyd Zusman <l...@asfast.com> wrote:
> Is there any way to modify this S-Lang macro so that it will
> automatically skip to the next article instead of aborting when this
> kind of error occurs?
You could put an error block before the part of the function that might
fail, which looks like this line:
> if (re_search_article (str))
If the article isn't available when this function is called, I'm guessing
this function will error() instead of returning 0. Perhaps replacing this
line with:
ERROR_BLOCK
{
_clear_error ();
message ("Article missing!");
update ();
continue; % go to the next iteration
}
if (re_search_article (str))
(really, inserting the ERROR_BLOCK just before that line). So now when the
article isn't there and re_search_article() errors, the error is cleared and
you'll get a message.
I haven't tested this, but an ERROR_BLOCK might be what you're looking for.
Hope this helps!
Technical Details
Message-ID:
<slrn6tcib1.gg3.bluemoon@ux6.cso.uiuc.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mailReferences:
<lt7m09d7sr.fsf@asfast.com>Show Full Headers
Complete Article Headers
Message-ID: <slrn6tcib1.gg3.bluemoon@ux6.cso.uiuc.edu> Subject: Re: [slrn] Preventing an S-Lang macro from aborting. Date: Sun, 16 Aug 1998 00:00:00 +0000 From: blue...@ux6.cso.uiuc.edu (Dawn Owens-Nicholson) References: <lt7m09d7sr.fsf@asfast.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mail X-Deja-AN: 381558758 Organization: University of Illinois at Urbana-Champaign Newsgroups: alt.lang.s-lang,news.software.readers