Don't render pure error types in OverrideMemberChooserObject

#KT-34379 Fixed
This commit is contained in:
Vladimir Dolzhenko
2019-10-16 12:16:12 +02:00
parent 148a6bd54d
commit 30229da95a
8 changed files with 43 additions and 19 deletions
@@ -26,3 +26,11 @@ open class KotlinExceptionWithAttachments : RuntimeException, ExceptionWithAttac
return this
}
}
inline fun checkWithAttachment(value: Boolean, lazyMessage: () -> String, attachments: (KotlinExceptionWithAttachments) -> Unit = {}) {
if (!value) {
val e = KotlinExceptionWithAttachments(lazyMessage())
attachments(e)
throw e
}
}