Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need a fix
Message
De
05/08/2012 09:49:26
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01549964
Message ID:
01549980
Vues:
91
Thanks for the lead, Sergey.

>Why do you need ON ERROR? Use TRY...ENDTRY
>
>
>>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?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform