Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need a fix
Message
From
04/08/2012 17:09:13
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Need a fix
Miscellaneous
Thread ID:
01549964
Message ID:
01549964
Views:
127
UPDATE - Moved to the EXIT command and it seems to be getting the job done.

The code below sometimes hit a URL that will not cooperate and the code fails.(Error/Crash)

FOR EACH loLink IN o.DOCUMENT.Links
* FAILURE/ERROR OCCURS HERE
lcOutput = [ ] + loLink.Href + [ ]

IF "blog" $ lcOutput OR "comment" $ lcOutput OR "opinion" $ lcOutput OR "editorial" $ lcOutput OR "letter" $ lcOutput;
OR "twitter" $ lcOutput OR "facebook" $ lcOutput
lcOutput = lcOutput
ELSE
lcOutput = ""
ENDIF

IF "2012/08/04" $ lcOutput OR "120804" $ lcOutput OR "08/04/2012" $ lcOutput OR "04/08/2012" $ lcOutput;
OR "Aug 4" $ lcOutput OR "August 4" $ lcOutput OR "2012-08-04" $ lcOutput OR "04-08-2012" $ lcOutput;
OR "12-08-04" $ lcOutput
lcOutput = lcOutput
ELSE
lcOutput = ""
ENDIF

SELECT URLS
IF LEN(lcOutput)>5
APPEND BLANK
REPLACE Location WITH lcOutput
? lcOutput
PreviouslcOutput = ALLTRIM(lcOutput)
ENDIF
ENDFOR

I have tried several ideals to find a way to handle the error so that the execution will skip over the cause(URL that will not open) and move to the next URL without an error Occurring.
Oddly, no luck with ON ERROR SKIP ;-)

Any ideas?
I ain't skeert of nuttin eh?
Yikes! What was that?
Next
Reply
Map
View

Click here to load this message in the networking platform