Skip to content

Commit 41d6e37

Browse files
amalloygoogle-java-format Team
authored andcommitted
Improve error message for malformed edits
PiperOrigin-RevId: 479639885
1 parent 72248ab commit 41d6e37

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

core/src/main/java/com/google/googlejavaformat/java/StringWrapper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ static String wrap(final int columnLimit, String input, Formatter formatter)
9696
if (!expected.equals(actual)) {
9797
throw new FormatterException(
9898
String.format(
99-
"Something has gone terribly wrong. Please file a bug: "
99+
"Something has gone terribly wrong. We planned to make the below formatting change,"
100+
+ " but have aborted because it would unexpectedly change the AST.\n"
101+
+ "Please file a bug: "
100102
+ "https://github.com/google/google-java-format/issues/new"
101103
+ "\n\n=== Actual: ===\n%s\n=== Expected: ===\n%s\n",
102104
actual, expected));

0 commit comments

Comments
 (0)