Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error 2027 DLL Caused an Exception
Message
De
10/02/2014 16:11:28
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01593920
Message ID:
01593936
Vues:
57
>>Ok Based on the above I Tried to make Changes in my Code. But seems to be not Okay ? I also didn't got how I will log the Error. Can you please extend your help based on my Code as mentioned below.
>>
>>
>>nRECCOUNTCONVERT=ALLTRIM(STR(RECCOUNT()))
>>cRECCOUNTCONVERT=' of '+ALLTRIM(STR(RECCOUNT()))
>>Local loMyObject
>>loMyObject = CreateObject("MyObject")
>>loMyObject.Mainprocess()
>>Return
>>
>>DEFINE CLASS MyObject AS Custom
>>PROCEDURE Mainprocess
>Local Parallel as Parallel
>>local llReTry
>llReTry = .f.
>
>>Parallel = NewObject("Parallel", "ParallelFox.vcx")
>>Parallel.SetWorkerCount(Parallel.CPUCount)
>>Parallel.StartWorkers()
>>
>>SCAN
>>oFilename=ALLTRIM(Fullpath)
>>iFilename=ALLTRIM(Newpath)
>>RCNON=Recno()
>>Try
>>Parallel.CallMethod("Pdf2Ps", This.Class, This.ClassLibrary,,,oFilename,iFilename,RCNON)
>>catch to loError
>>   if loError.ErrorNo = 2027
>>       llReTry = .t.
>>   else
>> *     log the error
>>   endif
>>ENDTRY
>>if m.llReTry
>>   try
>>Parallel.CallMethod("Pdf2Ps", This.Class, This.ClassLibrary,,,oFilename,iFilename,RCNON)
>>   catch to loError
>> *     log the error
>
>>ENDTRY
>>ENDSCAN
>>ENDPROC
>>
>>PROCEDURE PDF2PS
>>PARAMETERS oFilename,iFilename,RCNON
>>Declare INTEGER VeryPDF_PDF2Vector in pdf2vec.dll String strCommandLine
>>Strcmd= 'pdf2vec -$ XXXXXXXXXXXXXXXX '+CHR(34)+iFilename+CHR(34)+" "+CHR(34)+oFilename+CHR(34)
>>nRet = VeryPDF_PDF2Vector(strcmd)
>>Sys(2335, 1)	&& disable unattended mode, allow UI
>>WAIT WINDOW 'Converting to PS..'+ALLTRIM(STR(RCNON)) NOWAIT
>>RETURN
>>ENDPROC
>>ENDDEFINE
>>
>>
>
>I made some changes in your code.
>
>Logging the error is normally done with writing to a log file with strtofile. We have a special WriteToLog method which uses strtofile to write to the log file. You will need to implement your own logging of the error.

Thanks, It worked fine than before, Previously it was giving error at Many instances but now giving errors at 4-5 Instances when I take the sample of 1000 files, Seems that the Second TRY is making the conversion success. Is it not possible to Keep TRYING unless it succeeds using DO WHILE.
Harsh
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform