[JS IR] Commonize CLI error reporting
Use general `AnalysisResult.CompilationErrorException` instead of custom JsIrCompilationError to indicate about unsuccessful compilation - Drop JsIrCompilationError
This commit is contained in:
@@ -363,8 +363,6 @@ fun getModuleDescriptorByLibrary(current: KotlinLibrary, mapping: Map<String, Mo
|
||||
return md
|
||||
}
|
||||
|
||||
object JsIrCompilationError : Throwable()
|
||||
|
||||
sealed class MainModule {
|
||||
class SourceFiles(val files: List<KtFile>) : MainModule()
|
||||
class Klib(val lib: KotlinLibrary) : MainModule()
|
||||
@@ -416,7 +414,7 @@ private class ModulesStructure(
|
||||
var hasErrors = false
|
||||
if (analyzer.hasErrors() || analysisResult !is JsAnalysisResult) {
|
||||
if (!errorPolicy.allowErrors)
|
||||
throw JsIrCompilationError
|
||||
throw AnalysisResult.CompilationErrorException()
|
||||
else hasErrors = true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user