TRY Bunches of code... CATCH TO oException (come here if a variable in the TRY block proves false - not sure I even need oException here) IF oException.ErrorNo = 1 STRTOFILE("Error occurred at: " + TRANSFORM(DATETIME()); + CHR(13),"C:\Errors.log",.T.) ENDIF FINALLY RETURN .T. ENDTRY