Keep attachments of cause exception in KotlinExceptionWithAttachments and provide elements in attachments in case of errors during kotlin idea resolution

Relates to EA-210942, EA-209622 etc
This commit is contained in:
Vladimir Dolzhenko
2019-10-16 18:10:04 +02:00
parent 39f4a95278
commit 30b98aaeb7
2 changed files with 9 additions and 2 deletions
@@ -13,7 +13,11 @@ open class KotlinExceptionWithAttachments : RuntimeException, ExceptionWithAttac
constructor(message: String) : super(message)
constructor(message: String?, cause: Throwable?) : super(message, cause)
constructor(message: String?, cause: Throwable?) : super(message, cause) {
if (cause is KotlinExceptionWithAttachments) {
attachments.addAll(cause.attachments)
}
}
override fun getAttachments(): Array<Attachment> = attachments.toTypedArray()