fail (fail)

Syntax:

fail( 'message' );

Description:

Produces an error and appends the specified 'message' to the test report. The test case is terminated.

Return value:

void

Example:

monitor;

  produceAnException(doFailure);
  
  fail('produceAnException(..) should have raised an error.');

on-error;
  // Success. Failure exception was seen.
endmon;

Cobol Syntax:

Call "fail" Using
   [By Content "message".