[CORDA-3342] - Show proper error message and adjust indentation in shell ()

This commit is contained in:
Dimos Raptis 2019-10-21 13:21:12 +01:00 committed by Anthony Keenan
parent c882b221a5
commit bb7c06fa45

View File

@ -175,11 +175,13 @@ abstract class ANSIProgressRenderer {
var indent = 0
while (errorToPrint != null) {
ansi.fgRed()
ansi.a("${IntStream.range(indent, indent).mapToObj { "\t" }.toList().joinToString(separator = "") { s -> s }} $errorIcon ${error.message}")
ansi.reset()
ansi.a("${"\t".repeat(indent)}$errorIcon ${errorToPrint.message}")
ansi.newline()
errorToPrint = errorToPrint.cause
indent++
}
ansi.reset()
ansi.eraseLine(Ansi.Erase.FORWARD)
ansi.newline()
newLinesDrawn++