kapt: Light class stub producer in compiler

This commit is contained in:
Yan Zhulanow
2015-05-28 20:16:43 +03:00
parent 571c9073fa
commit fbb8d28120
4 changed files with 111 additions and 4 deletions
@@ -152,6 +152,9 @@ 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);
@@ -201,4 +204,12 @@ 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;
}
}
}