getError()
Return the current error message.
Syntax
getError()
RETURNS ggc.Message
In the return the ggc.isErrorMessage
field of the Message message record should be TRUE
.
Usage
You can use it to retrieve the error message from the current (ERROR
)
instruction to the user allowing you to test this interaction in a scenario.
For more information on BDL ERROR
statements, see the ERROR topic
in Genero Business Development Language User Guide for
details.
You must declare a variable of type ggc.message
for the return. For example:
DEFINE msg ggc.Message
CALL ggc.getError() RETURNING msg.*
DISPLAY msg.message
CAUTION: Avoid writing code like
this:
LET msg = ggc.getError()
DISPLAY ggc.getError().message