private void doRunWithLogging(Connection<Object> connection, Stoppable serverControl, ExecutionListener executionListener) {
Command command = (Command) connection.receive();
try {
doRunWithExceptionHandling(command, serverControl, executionListener);
} catch (Throwable throwable) {
BuildExceptionReporter exceptionReporter = new BuildExceptionReporter(loggingServices.get(StyledTextOutputFactory.class), new StartParameter(), command.getClientMetaData());
exceptionReporter.reportException(throwable);
executionListener.onFailure(throwable);
}
}