error method

Future<void> error(
  1. String? message, {
  2. bool takeScreenshot = true,
  3. dynamic coordinates,
  4. dynamic data,
})

Implementation

Future<void> error(String? message, {bool takeScreenshot = true, dynamic coordinates, dynamic data}) async {
  dynamic response = await logEvent('ERROR', message, coordinates, data);
  // ignore: avoid_print
  print('====================Changing status for current task: ' 'ERROR' ' ====================');
  setStatus('ERROR');
  if (takeScreenshot == true) {
    await _attachScreenshot(this, response);
  }
}