From fc6948f8df66259db68097bb8e8b8fa819382778 Mon Sep 17 00:00:00 2001 From: Błażej Kardyś Date: Wed, 2 Sep 2020 11:56:39 +0200 Subject: Adding more descriptive comment for missing source set for javadoc creation --- .../src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/javadoc') 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.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 = briefFromContentNodes(descriptionToContentNodes(sourceSet)) -- cgit