notifyFailureEx()
Report a scenario failure, and provide the error information: file name, line number, and error message.
Syntax
notifyFailureEx(
fileName STRING,
lineNo INTEGER,
message STRING
- The
fileName
is the file name where the check failure occurred. - The
lineNo
is the line number in the file. - The
message
is the details of the error.
Usage
You can use it to notify the scenario user of a scenario failure. This is an implementation of
the notifyFailure() function where you must provide the
error information: file name, line number, and error message. If you write a check and
expect a failure to be recorded and reported at the end, call this function when your check
fails. At the end of the scenario all failures will be listed, formatted
as:
filename:lineno:message
For
example:/home/f4gl/app/myapp.4gl:82:error: The action 'hello' is not found.
Calling
this function stops the scenario.For example:
IF (ggc.getFormName() != "bad price") THEN
CALL ggc.notifyFailureEx("test.4gl",2, SFMT("Form name is not valid, expected: 'bad price', got: '%1'", getFormName()))
END IF