[jOOQ/jOOQ#9506] Better error message when doing illegal edits

This commit is contained in:
Lukas Eder 2024-11-27 14:32:30 +01:00
parent 12b590548b
commit 32d6e26f73

View File

@ -641,7 +641,14 @@ final class CommitImpl extends AbstractNode<Commit> implements Commit {
// Altering history is not allowed
if (!StringUtils.equals(historicFile.content(), file.content()))
throw new DataMigrationVerificationException("Cannot edit increment file that has already been applied: " + file);
throw new DataMigrationVerificationException("""
Cannot edit increment file that has already been applied: {file}
Please revert the file to its original content:
{content}
""".replace("{file}", file.path())
.replace("{content}", file.content())
);
// History was altered, but the alteration was reverted
else