aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Kotlin/DocumentationBuilder.kt9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Kotlin/DocumentationBuilder.kt b/src/Kotlin/DocumentationBuilder.kt
index 18a1e74c..e193817a 100644
--- a/src/Kotlin/DocumentationBuilder.kt
+++ b/src/Kotlin/DocumentationBuilder.kt
@@ -171,8 +171,13 @@ class DocumentationBuilder(val session: ResolveSession,
}
fun resolveContentLink(descriptor: DeclarationDescriptor, href: String): ContentBlock {
- val symbols = resolveKDocLink(session, descriptor, null, href.split('.').toList())
- val symbol = findTargetSymbol(symbols)
+ val symbol = try {
+ val symbols = resolveKDocLink(session, descriptor, null, href.split('.').toList())
+ findTargetSymbol(symbols)
+ } catch(e: Exception) {
+ null
+ }
+
// don't include unresolved links in generated doc
// assume that if an href doesn't contain '/', it's not an attempt to reference an external file
if (symbol != null) {