[Analysis] change null element rendering in exceptions to distinguish will "null" strings

This commit is contained in:
Ilya Kirillov
2022-08-09 10:35:20 +02:00
parent 28b159ef85
commit 75787be2f8
@@ -16,10 +16,10 @@ public class ExceptionAttachmentBuilder {
public fun <T> withEntry(name: String, value: T, render: (T & Any) -> String) {
withEntry(name) {
appendLine("Class: ${value?.let { it::class.java.name }}")
appendLine("Class: ${value?.let { it::class.java.name } ?: "<null>"}")
appendLine("Value:")
withIndent {
appendLine(value?.let(render) ?: "null")
appendLine(value?.let(render) ?: "<null>")
}
}
}
@@ -28,7 +28,7 @@ public class ExceptionAttachmentBuilder {
with(printer) {
appendLine("- $name:")
withIndent {
appendLine(value)
appendLine(value ?: "<null>")
}
appendLine(separator)
}