improve an error message in clinic

This commit is contained in:
Antoine Pitrou 2014-01-14 20:52:01 +01:00
parent 5c15424aa9
commit cc1d31e09e
1 changed files with 4 additions and 1 deletions

View File

@ -970,7 +970,10 @@ class BlockParser:
if self.verify:
computed = compute_checksum(output)
if checksum != computed:
fail("Checksum mismatch!\nExpected: {}\nComputed: {}".format(checksum, computed))
fail("Checksum mismatch!\nExpected: {}\nComputed: {}\n"
"Suggested fix: remove all generated code including "
"the end marker, or use the '-f' option."
.format(checksum, computed))
else:
# put back output
output_lines = output.splitlines(keepends=True)