ERROR
The ERROR statement displays an error message on the Error line, and rings the
terminal bell.
string is a quoted string of a length no greater than the number of characters that the Error line of the current 4GL window can display.
- ariable is the name of a CHAR or VARCHAR variable whose contents are to be displayed
on the Error line of the 4GL Application window.
The string or variable specifies all or part of the text of a screen message
to be displayed on the Error line.
You can specify any combination of character variables and literal character
strings for the message. 4GL generates the message to display by replacing any
variables with their values, and concatenating the returned strings. The total
length of this message must not be greater than the number of characters that
the Error line can display in a single line of the 4GL Application window. The
message text remains on the screen until the user presses the next key.
The error text appears in a borderless single-line 4GL window on the Error
line. This 4GL window opens to display your text when ERROR is executed, and closes at the next keystroke by the user. When this 4GL window closes, any
underlying display on the same line becomes visible again.
If 4GL was in Line mode when the ERROR statement is encountered, it first
closes the Line mode overlay and then clears the Error line of any output from the
DISPLAY or PROMPT statements before displaying the text.
The position of the Error line is determined by the most recently executed
ERROR LINE specification in the OPTIONS statement. Otherwise, the default Error
line position is the last line of the screen. Because the Error line is
positioned relative to the application window, rather than to the current 4GL window,
you cannot use the OPEN WINDOW statement to reposition the Error line.
References
DISPLAY
MESSAGE
OPTIONS
PROMPT
WHENEVER