aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-09-24 21:53:52 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-09-24 21:53:52 +0300
commitc248ad0a18fe5744fba0a816286b2d6a8d67c76b (patch)
tree767e6a1086c93006eedfb0366141041ccc989fca /core
parent3617e8c0962e32201605c154c5360c1e5defab12 (diff)
parent835c3b1b6f76fff29290949cc14cad2a2b26b265 (diff)
downloaddokka-c248ad0a18fe5744fba0a816286b2d6a8d67c76b.tar.gz
dokka-c248ad0a18fe5744fba0a816286b2d6a8d67c76b.tar.bz2
dokka-c248ad0a18fe5744fba0a816286b2d6a8d67c76b.zip
Merge remote-tracking branch 'origin/kotlin-website-jonnyzzz' into kotlin-website-jonnyzzz
Diffstat (limited to 'core')
-rw-r--r--core/src/main/kotlin/Generation/FileGenerator.kt18
1 files changed, 1 insertions, 17 deletions
diff --git a/core/src/main/kotlin/Generation/FileGenerator.kt b/core/src/main/kotlin/Generation/FileGenerator.kt
index 8a282ef1..c90d0735 100644
--- a/core/src/main/kotlin/Generation/FileGenerator.kt
+++ b/core/src/main/kotlin/Generation/FileGenerator.kt
@@ -25,27 +25,11 @@ class FileGenerator @Inject constructor(@Named("outputDir") override val root: F
//TODO: it opens the way to safely track all files created
//TODO: to make sure no files were overwritten by mistake
//TODO: also, the NodeLocationAwareGenerator should be removed
- val stack = "$context\n" + try {
- throw Error()
- } catch (t: Throwable) {
- StringWriter().use { ww ->
- PrintWriter(ww).use {
- t.printStackTrace(it)
- }
- ww.toString().split("[\r\n]+").asSequence().drop(1).take(3).joinToString("\n") {" $it"}
- }
- }
- val writes = createdFiles.getOrDefault(this, listOf()) + stack
+ val writes = createdFiles.getOrDefault(this, listOf()) + context
createdFiles[this] = writes
if (writes.size > 1) {
println("ERROR. An attempt to write ${this.relativeTo(root)} several times!")
-
- createdFiles[this] = writes + stack
- for (call in writes + stack) {
- println(call)
- }
- println()
return
}