diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.kt | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/main.kt b/src/main.kt index 6f5cf796..6136300f 100644 --- a/src/main.kt +++ b/src/main.kt @@ -83,10 +83,15 @@ public fun main(args: Array<String>) { val moduleContent = Content() for (include in includes) { - val text = File(include).readText() - val tree = MarkdownProcessor.parse(text) - val content = buildContent(tree, session.getPackageFragment(FqName.ROOT)) - moduleContent.children.addAll(content.children) + val file = File(include) + if (file.exists()) { + val text = file.readText() + val tree = MarkdownProcessor.parse(text) + val content = buildContent(tree, session.getPackageFragment(FqName.ROOT)) + moduleContent.children.addAll(content.children) + } else { + println("WARN: Include file $file was not found.") + } } val documentationModule = DocumentationModule(arguments.moduleName, moduleContent) |