EA-214241: Remove worthless error reporting

This commit is contained in:
Yan Zhulanow
2019-11-15 00:42:51 +09:00
parent 16c4b0e458
commit 69d5115b89
@@ -113,12 +113,7 @@ private fun getTopmostParentOnLineOrSelf(element: PsiElement, document: Document
var parent = current.parent
while (parent != null && parent !is PsiFile) {
val offset = parent.textOffset
if (offset > document.textLength) {
val containingFile = element.containingFile
val attachments = if (containingFile != null) arrayOf(attachmentByPsiFile(containingFile)) else emptyArray()
LOG.error("Wrong offset: $offset for line $line. Should be in range: [0, ${document.textLength}].", *attachments)
break
}
if (offset > document.textLength) break
if (offset >= 0 && document.getLineNumber(offset) != line) break
current = parent