void (boolean aborted, int errors, int warnings, @NotNull final CompileContext compileContext) { try { for (CompilerMessageCategory category : CompilerMessageCategory.values()) { CompilerMessage[] messages = compileContext.getMessages(category); for (CompilerMessage message : messages) { String text = message.getMessage(); if (category != CompilerMessageCategory.INFORMATION || !isSpamMessage(text)) { myMessages.add(message); } } } Assert.assertFalse("Code did not compile!", aborted); } catch (Throwable t) { myError = t; } finally { mySemaphore.up(); } }