aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentationFragments.kt
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2021-02-16 12:13:29 +0100
committerGitHub <noreply@github.com>2021-02-16 12:13:29 +0100
commit116179e26a60d1b98d842ff6decc6119062475ae (patch)
tree69ab6cf37bfc1896fd9980f22c3187982abea596 /plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentationFragments.kt
parent23d969f162ce987cf181b228e8c7ad32d2a68f2d (diff)
downloaddokka-116179e26a60d1b98d842ff6decc6119062475ae.tar.gz
dokka-116179e26a60d1b98d842ff6decc6119062475ae.tar.bz2
dokka-116179e26a60d1b98d842ff6decc6119062475ae.zip
Be more explicit about what went wrong in package and module docs (#1737)
Diffstat (limited to 'plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentationFragments.kt')
-rw-r--r--plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentationFragments.kt5
1 files changed, 4 insertions, 1 deletions
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) {