diff options
author | Eugene Petrenko <eugene.petrenko@jetbrains.com> | 2018-09-13 13:38:11 +0300 |
---|---|---|
committer | Eugene Petrenko <eugene.petrenko@jetbrains.com> | 2018-09-13 13:38:11 +0300 |
commit | 87a449eb3293448f92c938b4fe9863a32373c439 (patch) | |
tree | 680351958c6449474f1c70eea8cf8f605f1f667f /core/src/main/kotlin | |
parent | 0b18da608eddfb48a40675d83ae3a92fc9a85fb6 (diff) | |
download | dokka-87a449eb3293448f92c938b4fe9863a32373c439.tar.gz dokka-87a449eb3293448f92c938b4fe9863a32373c439.tar.bz2 dokka-87a449eb3293448f92c938b4fe9863a32373c439.zip |
more logging
Diffstat (limited to 'core/src/main/kotlin')
-rw-r--r-- | core/src/main/kotlin/Generation/DocumentationMerger.kt | 20 | ||||
-rw-r--r-- | core/src/main/kotlin/Generation/DokkaGenerator.kt | 2 |
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 { |