log.debug("Stopping build: {} #{}", project.getName(), buildNumber);
try {
// Security: doStop eventually checks to see if the task owner has permission to abort the build
build.doStop(DummyStaplerRequest.INSTANCE, DummyStaplerResponse.INSTANCE);
} catch (IOException e) {
throw new ServiceRuntimeException("Stop failed for " + project.getName() + " #" + buildNumber, e);
} catch (ServletException e) {
throw new ServiceRuntimeException("Stop failed for " + project.getName() + " #" + buildNumber, e);
}
}