Add null-checking to KotlinIdeaResolutionException constructors

- NPE here leads to loosing the actual exception
- EA-235059 Fixed
This commit is contained in:
Roman Golyshev
2020-07-20 14:30:33 +03:00
parent f7031e65ba
commit cc0a787735
@@ -125,7 +125,10 @@ private class KotlinIdeaResolutionException(
})
for (element in resolvingWhat.elements.withIndex()) {
withAttachment("element${element.index}.kt", element.value.text)
withAttachment("file${element.index}.kt", element.value.containingFile.text)
withAttachment(
"file${element.index}.kt",
element.value.containingFile?.text ?: "No file! 'element.value' ${element.value} have 'containingFile' == null"
)
}
}
}