public List<AbstractMessage> getFatalErrors(boolean includeReadMessages, boolean includeSubmittedMessages) {
    List<AbstractMessage> result = new ArrayList<>();
    for (AbstractMessage message : myErrors) {
      if (!includeReadMessages && message.isRead()) continue;
      if (!includeSubmittedMessages && (message.isSubmitted() || message.getThrowable() instanceof TooManyErrorsException)) continue;
      result.add(message);
    }
    return result;
  }
public List<AbstractMessage> getFatalErrors(boolean includeReadMessages, boolean includeSubmittedMessages)