aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorBłażej Kardyś <bkardys@virtuslab.com>2020-09-02 11:56:39 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-09-03 13:20:42 +0200
commitfc6948f8df66259db68097bb8e8b8fa819382778 (patch)
treeb41f4fcc9fe0a5d71137e6857756decd93ba0108 /plugins
parent422d31d7cc31c759557cce26383adcae171e657e (diff)
downloaddokka-fc6948f8df66259db68097bb8e8b8fa819382778.tar.gz
dokka-fc6948f8df66259db68097bb8e8b8fa819382778.tar.bz2
dokka-fc6948f8df66259db68097bb8e8b8fa819382778.zip
Adding more descriptive comment for missing source set for javadoc creation
Diffstat (limited to 'plugins')
-rw-r--r--plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt
index 2fb00335..0379a752 100644
--- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt
+++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt
@@ -191,7 +191,8 @@ open class JavadocPageCreator(
}.orEmpty()
fun List<ContentNode>.nodeForJvm(jvm: DokkaSourceSet): ContentNode =
- first { jvm.sourceSetID in it.sourceSets.sourceSetIDs }
+ firstOrNull { jvm.sourceSetID in it.sourceSets.sourceSetIDs }
+ ?: throw IllegalStateException("No source set found for ${jvm.sourceSetID} ")
private fun Documentable.brief(sourceSet: DokkaSourceSet? = highestJvmSourceSet): List<ContentNode> =
briefFromContentNodes(descriptionToContentNodes(sourceSet))