anchor.diff:      var projectContents =
           simpleProject(sourceText: 'main() { print(0); print(1); }');
       var projectDir = await createProjectDir(projectContents);
  -    var cli = _createCli(injectArtificialException: true);
  -    await assertRunFailure([projectDir], cli: cli);
  +    injectArtificialException = true;
  +    await assertRunFailure([projectDir]);
       var errorOutput = logger.stderrBuffer.toString();
       expect(
           'Artificial exception triggered'.allMatches(errorOutput), hasLength(1));
  
positive.code:   test_lifecycle_exception_handling() async {
      var projectContents = simpleProject(sourceText: 'main() { print(0); }');
      var projectDir = await createProjectDir(projectContents);
      var cli = _createCli(injectArtificialException: true);
      await assertRunFailure([projectDir], cli: cli);
      var errorOutput = logger.stderrBuffer.toString();
      expect(errorOutput, contains('Artificial exception triggered'));
      expect(
  
negative.code:   test_lifecycle_exception_handling_ignore() async {
      var projectContents = simpleProject(sourceText: 'main() { print(0); }');
      var projectDir = await createProjectDir(projectContents);
      injectArtificialException = true;
      var cli = _createCli();
      await runWithPreviewServer(cli, ['--ignore-exceptions', projectDir],
          (url) async {
        var output = logger.stdoutBuffer.toString();
  