Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error 2027 DLL Caused an Exception
Message
 
 
To
10/02/2014 15:54:01
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01593920
Message ID:
01593932
Views:
48
>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.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform