Report compiler exception on plugin load fail

This commit is contained in:
Yan Zhulanow
2015-02-25 17:47:36 +03:00
parent 20fc298113
commit 2d6186b155
@@ -95,10 +95,13 @@ public class K2JVMCompiler extends CLICompiler<K2JVMCompilerArguments> {
PluginCliParser.loadPlugins(arguments, configuration);
}
catch (CliOptionProcessingException e) {
// TODO Print usage?
messageCollector.report(CompilerMessageSeverity.ERROR, e.getMessage(), CompilerMessageLocation.NO_LOCATION);
return INTERNAL_ERROR;
}
catch (Throwable t) {
MessageCollectorUtil.reportException(messageCollector, t);
return INTERNAL_ERROR;
}
if (arguments.script) {
if (arguments.freeArgs.isEmpty()) {