aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt')
-rw-r--r--plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt b/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
index d9ff924b..41dffa07 100644
--- a/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
+++ b/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
@@ -4,6 +4,8 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
+import org.jetbrains.dokka.DokkaConfiguration.DokkaSourceSet
+import org.jetbrains.dokka.DokkaException
import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.resolvers.local.LocationProvider
import org.jetbrains.dokka.model.DisplaySourceSet
@@ -157,7 +159,10 @@ abstract class DefaultRenderer<T>(
}
open suspend fun renderPage(page: PageNode) {
- val path by lazy { locationProvider.resolve(page, skipExtension = true)!! }
+ val path by lazy {
+ locationProvider.resolve(page, skipExtension = true)
+ ?: throw DokkaException("Cannot resolve path for ${page.name}")
+ }
when (page) {
is ContentPage -> outputWriter.write(path, buildPage(page) { c, p -> buildPageContent(c, p) }, ".html")
is RendererSpecificPage -> when (val strategy = page.strategy) {