mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 17:07:15 +02:00
Revert error message escaping to hand written version
It turns out that SourceCodeEscapers has still not been released to github. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=196721579
This commit is contained in:
parent
9c0d3b6db3
commit
f1219120ea
1 changed files with 5 additions and 3 deletions
|
@ -28,7 +28,6 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
import com.google.common.base.Ascii;
|
import com.google.common.base.Ascii;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.ImmutableTable;
|
import com.google.common.collect.ImmutableTable;
|
||||||
import com.google.common.escape.SourceCodeEscapers;
|
|
||||||
import google.registry.util.Clock;
|
import google.registry.util.Clock;
|
||||||
import google.registry.util.SystemClock;
|
import google.registry.util.SystemClock;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
|
@ -260,8 +259,11 @@ public class ShellCommand implements Command {
|
||||||
* <p>Dumps the last line of output prior to doing this.
|
* <p>Dumps the last line of output prior to doing this.
|
||||||
*/
|
*/
|
||||||
private void emitFailure(Throwable e) throws IOException {
|
private void emitFailure(Throwable e) throws IOException {
|
||||||
System.out.println(FAILURE + e.getClass().getName() + " "
|
System.out.println(
|
||||||
+ SourceCodeEscapers.javaCharEscaper().escape(e.getMessage()));
|
FAILURE
|
||||||
|
+ e.getClass().getName()
|
||||||
|
+ " "
|
||||||
|
+ e.getMessage().replace("\\", "\\\\").replace("\n", "\\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue