void (@Nullable File file, @NotNull Collection<? extends Exception> exceptions, @NotNull List<? extends ModelProblem> modelProblems, @NotNull Collection<? super MavenProjectProblem> collector) { for (Throwable each : exceptions) { collector.addAll(collectExceptionProblems(file, each)); } for (ModelProblem problem : modelProblems) { String source; if (!StringUtilRt.isEmptyOrSpaces(problem.getSource())) { source = problem.getSource() + ":" + problem.getLineNumber() + ":" + problem.getColumnNumber(); } else { source = file == null ? "" : file.getPath(); } myConsoleWrapper.error("Maven model problem: " + problem.getMessage() + " at " + problem.getSource() + ":" + problem.getLineNumber() + ":" + problem.getColumnNumber()); Exception problemException = problem.getException(); if (problemException != null) { List<MavenProjectProblem> exceptionProblems = collectExceptionProblems(file, problemException); if (exceptionProblems.isEmpty()) { myConsoleWrapper.error("Maven model problem", problemException); collector.add(MavenProjectProblem.createStructureProblem(source, problem.getMessage())); } else { collector.addAll(exceptionProblems); } } else { collector.add(MavenProjectProblem.createStructureProblem(source, problem.getMessage(), true)); } } }