ProcessTimeoutError constructor

ProcessTimeoutError({
  1. required String command,
  2. required String phase,
  3. required Duration timeout,
  4. String partialStdout = '',
  5. String partialStderr = '',
  6. List<String> hints = const [],
})

Implementation

ProcessTimeoutError({
  required this.command,
  required this.phase,
  required this.timeout,
  this.partialStdout = '',
  this.partialStderr = '',
  List<String> hints = const [],
}) : super(
        GlintErrorKind.toolTimeout,
        '$phase: `$command` did not finish within ${_secs(timeout)} and was killed'
        '${partialStderr.trim().isEmpty ? '' : '; stderr so far: ${_tail(partialStderr)}'}',
        nextSteps: [
          ...hints,
          'retry once; the stuck command was killed, nothing keeps running',
          'if it repeats, `device op:screenshot` shows whether the device is frozen; reboot or re-attach it',
        ],
        data: {'phase': phase, 'command': command, 'timeoutMs': timeout.inMilliseconds, 'scope': 'command'},
      );