Skip to content

Commit

Permalink
Console: Make error messages red color (#737)
Browse files Browse the repository at this point in the history
  • Loading branch information
gramian authored Jan 3, 2023
1 parent 8b9a585 commit 544875d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions console/src/main/java/com/arcadedb/console/Console.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import com.arcadedb.schema.DocumentType;
import com.arcadedb.utility.RecordTableFormatter;
import com.arcadedb.utility.TableFormatter;
import com.arcadedb.utility.AnsiCode;
import org.jline.reader.Completer;
import org.jline.reader.EndOfFileException;
import org.jline.reader.LineReader;
Expand Down Expand Up @@ -760,10 +761,10 @@ private void outputError(final Exception e) throws IOException {
try (final ByteArrayOutputStream out = new ByteArrayOutputStream(); final PrintWriter writer = new PrintWriter(out)) {
e.printStackTrace(writer);
writer.flush();
output("\nERROR:\n" + out + "\n");
output(AnsiCode.format("\n$ANSI{red ERROR:\n" + out + "}\n"));
}
} else
output("\nERROR: " + e.getMessage() + "\n");
output(AnsiCode.format("\n$ANSI{red ERROR: " + e.getMessage() + "}\n"));
}

private String getPrompt() {
Expand Down

0 comments on commit 544875d

Please sign in to comment.