void (String line, Consumer<? super BuildEvent> messageConsumer) { if (!myParsingContext.getProjectFailure()) { if (line.contains("[ERROR]")) { myParsingContext.setProjectFailure(true); messageConsumer.accept(new FinishBuildEventImpl(myTaskId, null, System.currentTimeMillis(), "", new FailureResultImpl())); } } }