diff --git a/testing/skia_gold_client/lib/skia_gold_client.dart b/testing/skia_gold_client/lib/skia_gold_client.dart index c4b25631179e2..5f654a4bc37c8 100644 --- a/testing/skia_gold_client/lib/skia_gold_client.dart +++ b/testing/skia_gold_client/lib/skia_gold_client.dart @@ -257,11 +257,20 @@ class SkiaGoldClient { final ProcessResult result = await _runCommand(imgtestCommand); if (result.exitCode != 0) { - // We do not want to throw for non-zero exit codes here, as an intentional - // change or new golden file test expect non-zero exit codes. Logging here - // is meant to inform when an unexpected result occurs. - print('goldctl imgtest add stdout: ${result.stdout}'); - print('goldctl imgtest add stderr: ${result.stderr}'); +final StringBuffer buf = StringBuffer() + ..writeln('Skia Gold received an unapproved image in post-submit ') + ..writeln('testing. Golden file images in flutter/engine are triaged ') + ..writeln('in pre-submit during code review for the given PR.') + ..writeln() + ..writeln('Visit https://flutter-engine-gold.skia.org/ to view and approve ') + ..writeln('the image(s), or revert the associated change. For more ') + ..writeln('information, visit the wiki: ') + ..writeln('https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package:flutter') + ..writeln() + ..writeln('Debug information for Gold --------------------------------') + ..writeln('stdout: ${result.stdout}') + ..writeln('stderr: ${result.stderr}'); + throw Exception(buf.toString()); } else if (verbose) { print('stdout:\n${result.stdout}'); print('stderr:\n${result.stderr}');