public void execute(ExecutionListener executionListener) { try { action.execute(executionListener); } catch (ReportedException e) { executionListener.onFailure(e.getCause()); } catch (Throwable t) { reporter.reportException(t); executionListener.onFailure(t); } }
public <T> T execute( BuildAction<T> action, BuildCancellationToken cancellationToken, ProviderOperationParameters actionParameters) { BuildActionParameters parameters = new DefaultBuildActionParameters( new GradleLauncherMetaData(), actionParameters.getStartTime(), this.parameters.getEffectiveSystemProperties(), System.getenv(), SystemProperties.getCurrentDir(), actionParameters.getBuildLogLevel()); try { return executer.execute(action, cancellationToken, parameters); } catch (ReportedException e) { throw new BuildExceptionVersion1(e.getCause()); } }