xHarbour Reference Documentation > Command Reference |
Defines the default error log file.
SET ERRORLOG TO <cLogFile> [ADDITIVE]
The SET ERRORLOG command is used in customized error handling routines where error information about runtime errors is written to a user-defined file. By default, runtime error information is stored in the Error.log file.
Note: xHarbour's default error handling routine is programmed in the file ERRORSYS.PRG.
See also: | BEGIN SEQUENCE, Error(), ErrorBlock(), Set(), SET ERRORLOOP, TRY...CATCH |
Category: | Environment commands , SET commands , xHarbour extensions |
Source: | rtl\set.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example demonstrates how a particular type of errors can be logged // in a separate file. The file receives information about file open errors. PROCEDURE Main ? OpenDatabases() RETURN FUNCTION OpenDatabases() LOCAL aErrLog := Set( _SET_ERRORLOG ) LOCAL oError LOCAL lSuccess := .T. SET ERRORLOG TO DbOpenError.log ADDITIVE USE Customer SET INDEX TO Cust01, Cust02 SET ERRORLOG TO ( aErrLog[1] ) RETURN lSuccess
http://www.xHarbour.com