Description
Sets or clears error information.
Syntax
status = Set_Status (error_flag, status_code, status_arguments)
Parameters
The Set_Status function has the following parameters.
Parameter | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
error_flag | The termination status of the stored procedure. Valid error_flags are:
| ||||||||
status_code | An alphanumeric error code that identifies the nature of an error. Delimit multiple codes using @FM. The errors are stored in the DOS file REVERROR.DAT and may contain replaceable parameters. If the code passed in this argument does not exist in REVERROR.DAT, the characters passed in the code argument become the text for the error. | ||||||||
status_arguments | A dynamic array of arguments used for replaceable parameters supplied in the status_code argument. Delimit multiple arguments using valuemarks (@VM). Note: You can use Set_Status() with Get_Status() to determine if a system routine failed. Before calling the routine, Set_Status(0) to clear any previous status. |
See also
Get_Status(), Set_FSError(), RevError.Dat, FsMsg routine
Remarks
/* The following code is roughly equivalent to the processing in the Set_FSError function. */ Equ SETSTAT_OK$ To 0 Equ SETSTAT_ERR$ To 1 Equ SETSTAT_APPEND$ To -1 If @FILE.ERROR Then code = @FILE.ERROR<FSCODE$> If Num(code) Then code = FSERROR_PREFIX$:code End End status = Set_Status(SETSTAT_ERR$, code, @FILE.ERROR<FSMSG$>)