From 116179e26a60d1b98d842ff6decc6119062475ae Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Tue, 16 Feb 2021 12:13:29 +0100 Subject: Be more explicit about what went wrong in package and module docs (#1737) --- .../moduleAndPackage/parseModuleAndPackageDocumentationFragments.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins/base/src/main') diff --git a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentationFragments.kt b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentationFragments.kt index d193ec0a..ea88e6e5 100644 --- a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentationFragments.kt +++ b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentationFragments.kt @@ -29,7 +29,10 @@ private fun parseModuleAndPackageDocFragment( val classifier = when (classifierAndName[0].trim()) { "Module" -> Module "Package" -> Package - else -> throw IllegalStateException("Unexpected classifier ${classifierAndName[0]}") + else -> throw IllegalStateException( + """Unexpected classifier ${classifierAndName[0]}, expected either "Module" or "Package". + |For more information consult the specification: https://kotlinlang.org/docs/reference/kotlin-doc.html#module-and-package-documentation""".trimMargin() + ) } if (classifierAndName.size != 2 && classifier == Module) { -- cgit