You are here: Development Standards > Routines > General Routines > GENERROR.PUB

# GENERROR.PUB

GENERROR.PUB is the public program for handling errors, messages and verifications. The interface programs GENERROR or GENLOCK should always be used to access GENERROR.PUB.

`0100 ENTER X9$,X8$,CUR_ERR,ERR_LINE,O7,Y$,HOST_ERR,MASK$,FILE$,PROGID$,FILE[ALL],YDISABLE$,PGM$,XKEY$,MX4,M8,M9,OSGUI$`

Variable | Parameter | Description
X9$ | X9$ | Message as defined in GENERROR
X8$ | X8$ | Message as defined in GENERROR
CUR_ERR | ERR | Last BASIC error
ERR_LINE | TCB(5) | The line on which the error occurred
O7 | O7 | Predefined message as defined in GENERROR
Y$ | Y$ | Command as defined in GENERROR
HOST_ERR | TCB(10) | Last host system error
MASK$ | X1$(1) | Mask variable assigned for use by GENINPUT.PUB
FILE$ | F$(1) | The data file name to be OPENed by the GENOPEN routine. It will be displayed when a file operation cannot be performed.
PROGID$ | PROGID$ | Program to call for the File Maintenance key
FILE[ALL] | FILE[ALL] | Standard file array
YDISABLE$ | YDISABLE$ | See definition of YDISABLE$ for GENERROR
PGM$ | PGM(-2) | Current program name
XKEY$ | X | Current field value
MX4 | X4 | Field length
M8 | MX8 | Numeric index to xxMS application message file
M9 | MX9 | Numeric index to xxMS application message file
OSGUI$ | OSGUI$ | GUI template (see GENGURES.PUB for more detail)

Exit Points | Explanation
EXIT | GENERROR.PUB does not exit with an error code.

GENERROR.PUB determines the appropriate message(s) to display, waits and validates an acknowledgment if necessary, and exits with the appropriate command in Y$.