From 924832f8ae7a38ad7c6b105c04794195bf9d4f9f Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Tue, 21 Nov 2017 02:58:34 +0300 Subject: More info in can't find node by signature --- core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt') diff --git a/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt b/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt index 275972fa..24f50dac 100644 --- a/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt +++ b/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt @@ -32,7 +32,16 @@ class DeclarationLinkResolver return ContentExternalLink(externalHref) } val signature = descriptorSignatureProvider.signature(symbol) - return ContentNodeLazyLink(href, { -> refGraph.lookupOrWarn(signature, logger) }) + val referencedAt = fromDescriptor.sourceLocation()?.let { ", referenced at $it" }.orEmpty() + + return ContentNodeLazyLink(href, { -> + val target = refGraph.lookup(signature) + + if (target == null) { + logger.warn("Can't find node by signature $signature$referencedAt") + } + target + }) } if ("/" in href) { return ContentExternalLink(href) -- cgit