aboutsummaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/kotlin/Generation/DocumentationMerger.kt20
-rw-r--r--core/src/main/kotlin/Generation/DokkaGenerator.kt2
2 files changed, 14 insertions, 8 deletions
diff --git a/core/src/main/kotlin/Generation/DocumentationMerger.kt b/core/src/main/kotlin/Generation/DocumentationMerger.kt
index 45233a50..40a4e30d 100644
--- a/core/src/main/kotlin/Generation/DocumentationMerger.kt
+++ b/core/src/main/kotlin/Generation/DocumentationMerger.kt
@@ -3,7 +3,8 @@ package org.jetbrains.dokka.Generation
import org.jetbrains.dokka.*
class DocumentationMerger(
- private val documentationModules: List<DocumentationModule>
+ private val documentationModules: List<DocumentationModule>,
+ val logger: DokkaLogger
) {
private val producedNodeRefGraph: NodeReferenceGraph = NodeReferenceGraph()
private val signatureMap: Map<DocumentationNode, String>
@@ -34,12 +35,17 @@ class DocumentationMerger(
val resultReferences = mutableListOf<DocumentationReference>()
for ((name, listOfPackages) in packagesByName) {
- val producedPackage = mergePackagesWithEqualNames(name, from, listOfPackages)
- updatePendingReferences()
-
- resultReferences.add(
- DocumentationReference(from, producedPackage, RefKind.Member)
- )
+ try {
+ val producedPackage = mergePackagesWithEqualNames(name, from, listOfPackages)
+ updatePendingReferences()
+
+ resultReferences.add(
+ DocumentationReference(from, producedPackage, RefKind.Member)
+ )
+ } catch (t: Throwable) {
+ val entries = listOfPackages.joinToString(",") { "references:${it.allReferences().size}" }
+ throw Error("Failed to merge package $name from $from with entries $entries. ${t.message}", t)
+ }
}
return resultReferences
diff --git a/core/src/main/kotlin/Generation/DokkaGenerator.kt b/core/src/main/kotlin/Generation/DokkaGenerator.kt
index f4161de9..9d718971 100644
--- a/core/src/main/kotlin/Generation/DokkaGenerator.kt
+++ b/core/src/main/kotlin/Generation/DokkaGenerator.kt
@@ -42,7 +42,7 @@ class DokkaGenerator(val dokkaConfiguration: DokkaConfiguration,
documentationModules.add(documentationModule)
}
- val totalDocumentationModule = DocumentationMerger(documentationModules).merge()
+ val totalDocumentationModule = DocumentationMerger(documentationModules, logger).merge()
totalDocumentationModule.prepareForGeneration(dokkaConfiguration)
val timeBuild = measureTimeMillis {