[LL FIR] fix user code leak from exceptions in :analysis:low-level-api-fir
Also, add more info to some exceptions
This commit is contained in:
committed by
Space Team
parent
df16fa3306
commit
e3d2bccb33
+7
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.utils.exceptions
|
||||
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.utils.getElementTextWithContext
|
||||
|
||||
@@ -12,4 +13,10 @@ fun ExceptionAttachmentBuilder.withPsiEntry(name: String, psi: PsiElement?) {
|
||||
withEntry(name, psi) { psiElement ->
|
||||
getElementTextWithContext(psiElement)
|
||||
}
|
||||
}
|
||||
|
||||
fun ExceptionAttachmentBuilder.withVirtualFileEntry(name: String, virtualFile: VirtualFile?) {
|
||||
withEntry(name, virtualFile) { file ->
|
||||
"path: ${file.path}, filetype: ${file.fileType} ,filesystem,${file.fileSystem}"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user