pushErrorMessage()
The textReport.pushErrorMessage() function places the specified error message on a stack. By keeping error messages in a stack, you can pop the latest message in a function and determine whether you can handle it there. If not, push it back on the stack and return so that a higher level function can make the same test.
You can call this function either from the text report engine or from the text report driver.
Syntax
textReport.[textReportDriver.]pushErrorMessage(
errorMsg STRING in)- textReport
- The name of a variable that is based on the TextReport external type.
- textReportDriver
- The name of a variable that is based on the TextReportDriver external type.
- errorMsg
- A string that contains an error message.
Example
In the following example, the program displays the most recently saved error message:
myReport TextReport = new TextReport();
myErrorMsg STRING; // set upon error
...
myReport.output(myReport.pushErrorMessage(myErrorMsg));