Re: errors in ex.err
Kat wrote:
>
> I've been getting less than useful error msgs lately, from an app that has run
>
> for years fairly flawlessly (except for the strange errors i reported and got
> laughed at here, and so i restart the app when i detect them), but this one i
> don't see how i can detect in advance:
>
> <from ex.err>
> ================
> u:\newsgetter\Eu webgetter tcp4u\Getabcnews4.exw:478
> slice lower index is less than 1 (-4)
>
> u:\newsgetter\Eu webgetter tcp4u\Getabcnews4.exw:478 if length(href)
> and not equal(href,"") and
>
> href = {47'/'}
>
> ===========================
> </from>
>
> The entire if-then code is:
> }}}
<eucode>
> if length(href) and not equal(href,"") and
> (not match("/REUTERS",upper(href))) and
> (not match("/AP",upper(href))) and
> (
> (not match(".HTML",upper(href[length(href)-5..length(href)]))) and
> (not match(".HTM", upper(href[length(href)-4..length(href)])))
> )
> then href = ""
> end if
> </eucode>
{{{
I assume you are testing for URLs that contain either /Reuters or /AP,
and end in either .HTML or .HTM, and you want to do it quickly, and
you want ex.err to report the more relevant line.
If so, this might also meet your requirements...
if length(href) < 7 then
href = ""
else
HREF = upper(href)
if match("/REUTERS",HREF) = 0 or match("/AP",HREF) = 0 then
href = ""
else
-- Just examine last 7 chars.
FERH = reverse(HREF[length(HREF)-6..length(HREF)])
if match("LMTH.",FREH) != 1 and match("MTH.", FREH) != 1 then
href = ""
end if
end if
end if
--
Derek Parnell
Melbourne, Australia
|
Not Categorized, Please Help
|
|