addWorkunitError

STD.System.Log.addWorkunitError ( text [ , code ] )

textA string containing the text to write.
codeOptional. The code number to associate with the text. If omitted, the default is zero (0).
Return:addWorkunitError does not return a value.

The addWorkunitError action writes the text string to the eclagent.log file for the workunit, and also displays the code and text in the Syntax Errors toolbox along with the Errors section of the ECL Watch page for the workunit.

Example:

IMPORT STD;
STD.System.Log.addWorkunitError('Got Here',1);    
   //write text to log and display "1: Got Here" in Errors