[Analysis] change null element rendering in exceptions to distinguish will "null" strings
This commit is contained in:
+3
-3
@@ -16,10 +16,10 @@ public class ExceptionAttachmentBuilder {
|
|||||||
|
|
||||||
public fun <T> withEntry(name: String, value: T, render: (T & Any) -> String) {
|
public fun <T> withEntry(name: String, value: T, render: (T & Any) -> String) {
|
||||||
withEntry(name) {
|
withEntry(name) {
|
||||||
appendLine("Class: ${value?.let { it::class.java.name }}")
|
appendLine("Class: ${value?.let { it::class.java.name } ?: "<null>"}")
|
||||||
appendLine("Value:")
|
appendLine("Value:")
|
||||||
withIndent {
|
withIndent {
|
||||||
appendLine(value?.let(render) ?: "null")
|
appendLine(value?.let(render) ?: "<null>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,7 +28,7 @@ public class ExceptionAttachmentBuilder {
|
|||||||
with(printer) {
|
with(printer) {
|
||||||
appendLine("- $name:")
|
appendLine("- $name:")
|
||||||
withIndent {
|
withIndent {
|
||||||
appendLine(value)
|
appendLine(value ?: "<null>")
|
||||||
}
|
}
|
||||||
appendLine(separator)
|
appendLine(separator)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user