kapt: Stop compiler gracefully
This commit is contained in:
@@ -152,9 +152,6 @@ public abstract class CLICompiler<A extends CommonCompilerArguments> {
|
||||
Disposer.dispose(rootDisposable);
|
||||
}
|
||||
}
|
||||
catch (CompilationInterruptedException e) {
|
||||
return e.exitCode;
|
||||
}
|
||||
catch (Throwable t) {
|
||||
groupingCollector.report(CompilerMessageSeverity.EXCEPTION, OutputMessageUtil.renderException(t),
|
||||
CompilerMessageLocation.NO_LOCATION);
|
||||
@@ -204,12 +201,4 @@ public abstract class CLICompiler<A extends CommonCompilerArguments> {
|
||||
return INTERNAL_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
public static class CompilationInterruptedException extends RuntimeException {
|
||||
final ExitCode exitCode;
|
||||
|
||||
public CompilationInterruptedException(ExitCode exitCode) {
|
||||
this.exitCode = exitCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -287,6 +287,8 @@ public class KotlinToJVMBytecodeCompiler {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!result.getShouldGenerateCode()) return null;
|
||||
|
||||
result.throwIfError();
|
||||
|
||||
return generate(environment, result, environment.getSourceFiles(), null, null);
|
||||
|
||||
Reference in New Issue
Block a user