[Gradle, JS] Config errors in webpack
#KT-38286 fixed
This commit is contained in:
+12
-1
@@ -16,6 +16,9 @@ class TeamCityMessageCommonClient(
|
|||||||
private val log: Logger,
|
private val log: Logger,
|
||||||
private val progressLogger: ProgressLogger
|
private val progressLogger: ProgressLogger
|
||||||
) : ServiceMessageParserCallback {
|
) : ServiceMessageParserCallback {
|
||||||
|
|
||||||
|
private val stackTraceProcessor = TeamCityMessageStackTraceProcessor()
|
||||||
|
|
||||||
override fun parseException(e: ParseException, text: String) {
|
override fun parseException(e: ParseException, text: String) {
|
||||||
log.error("Failed to parse test process messages: \"$text\"", e)
|
log.error("Failed to parse test process messages: \"$text\"", e)
|
||||||
}
|
}
|
||||||
@@ -30,7 +33,15 @@ class TeamCityMessageCommonClient(
|
|||||||
val value = text.trimEnd()
|
val value = text.trimEnd()
|
||||||
progressLogger.progress(value)
|
progressLogger.progress(value)
|
||||||
|
|
||||||
type?.let { log.processLogMessage(value, it) }
|
var actualType = type
|
||||||
|
stackTraceProcessor.process(text) { line ->
|
||||||
|
actualType = ERROR
|
||||||
|
if (line != null) {
|
||||||
|
printMessage(line, actualType)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
actualType?.let { log.processLogMessage(value, it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun regularText(text: String) {
|
override fun regularText(text: String) {
|
||||||
|
|||||||
+2
@@ -10,6 +10,8 @@ internal class TeamCityMessageStackTraceProcessor {
|
|||||||
|
|
||||||
fun process(text: String, firstLineAction: (String?) -> Unit) {
|
fun process(text: String, firstLineAction: (String?) -> Unit) {
|
||||||
firstLine = if (text.trim().startsWith("at ")) {
|
firstLine = if (text.trim().startsWith("at ")) {
|
||||||
|
// firstLineAction can have side effects
|
||||||
|
// that's why important to call it even with null line
|
||||||
firstLineAction(firstLine)
|
firstLineAction(firstLine)
|
||||||
null
|
null
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user