use of com.intellij.diagnostic.MessagePool in project intellij-community by JetBrains.
the class GuiTestUtil method failIfIdeHasFatalErrors.
// Called by MethodInvoker via reflection
@SuppressWarnings("unused")
public static void failIfIdeHasFatalErrors() {
final MessagePool messagePool = MessagePool.getInstance();
List<AbstractMessage> fatalErrors = messagePool.getFatalErrors(true, true);
int fatalErrorCount = fatalErrors.size();
for (int i = 0; i < fatalErrorCount; i++) {
LOG.error("** Fatal Error " + (i + 1) + " of " + fatalErrorCount);
AbstractMessage error = fatalErrors.get(i);
LOG.error("* Message: ");
LOG.error(error.getMessage());
String additionalInfo = error.getAdditionalInfo();
if (isNotEmpty(additionalInfo)) {
LOG.error("* Additional Info: ");
LOG.error(additionalInfo);
}
String throwableText = error.getThrowableText();
if (isNotEmpty(throwableText)) {
LOG.error("* Throwable: ");
LOG.error(throwableText);
}
}
if (fatalErrorCount > 0) {
throw new AssertionError(fatalErrorCount + " fatal errors found. Stopping test execution.");
}
}
use of com.intellij.diagnostic.MessagePool in project intellij-community by JetBrains.
the class GuiTestUtil method doesIdeHaveFatalErrors.
// Called by MethodInvoker via reflection
@SuppressWarnings("unused")
public static boolean doesIdeHaveFatalErrors() {
final MessagePool messagePool = MessagePool.getInstance();
List<AbstractMessage> fatalErrors = messagePool.getFatalErrors(true, true);
return !fatalErrors.isEmpty();
}
Aggregations