Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TRY/CATCH routine: Is FINALLY is mandatory in version before 9.0?

Rajesh Karunakaran

Programmer
Sep 29, 2016
537
0
16
MU
Hi all,

My client getting TRY/CATCH mismatch error in one program. Its a program where we convert a DBF to XLSX using the "VfpXworkbookXLSX" library. When I run at my end I don't come across that in spite of trying with various scenarios. Too, apparently I am not able to find anything wrong in the code. The only thing I see is that I have not included the 'FINALLY' section within the TRY...CATCH routine. I am not sure which Vfp version he's using. Also, my client calls this program from another program. I am not sure if there is a TRY/CATCH in that calling program.

Just to try, I am going to give him the edited version with the FINALLY added in all TRY/CATCH.

Anyway, is the 'FINALLY' section mandatory in Vfp version before 9.0?

Rajesh
 
No, FINALLY is like OTHERWISE in a case statement (sort of).
But no, it's not "mandatory. Only TRY ENDTRY is mandatory, everything else is optional.
 

Part and Inventory Search

Sponsor

Back
Top