From 2131a314b059e698104e297c00277ec92114a41c Mon Sep 17 00:00:00 2001 From: Mikhael Bogdanov Date: Mon, 22 Oct 2018 15:55:44 +0200 Subject: [PATCH] Add file content to parsing errors --- .../kotlin/android/tests/CodegenTestsOnAndroidGenerator.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/android-tests/tests/org/jetbrains/kotlin/android/tests/CodegenTestsOnAndroidGenerator.kt b/compiler/android-tests/tests/org/jetbrains/kotlin/android/tests/CodegenTestsOnAndroidGenerator.kt index 405b56db4c6..ea0e3dfafb9 100644 --- a/compiler/android-tests/tests/org/jetbrains/kotlin/android/tests/CodegenTestsOnAndroidGenerator.kt +++ b/compiler/android-tests/tests/org/jetbrains/kotlin/android/tests/CodegenTestsOnAndroidGenerator.kt @@ -137,7 +137,11 @@ class CodegenTestsOnAndroidGenerator private constructor(private val pathManager writeFiles( rawFiles.map { - CodegenTestFiles.create(it.first, it.second, environment.project).psiFile + try { + CodegenTestFiles.create(it.first, it.second, environment.project).psiFile + } catch (e: Throwable) { + throw RuntimeException("Error on processing ${it.first}:\n${it.second}", e) + } }, environment ) Disposer.dispose(disposable)