diff options
author | Błażej Kardyś <bkardys@virtuslab.com> | 2020-09-02 11:56:39 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-09-03 13:20:42 +0200 |
commit | fc6948f8df66259db68097bb8e8b8fa819382778 (patch) | |
tree | b41f4fcc9fe0a5d71137e6857756decd93ba0108 /plugins | |
parent | 422d31d7cc31c759557cce26383adcae171e657e (diff) | |
download | dokka-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.kt | 3 |
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)) |