code: private ExceptionCollection handleAnalysisExceptions(ExceptionCollection currentEx, ExceptionCollection newEx) throws MojoExecutionException {
          ExceptionCollection returnEx = currentEx;
          if (returnEx == null) {
              returnEx = newEx;
          } else {
              returnEx.getExceptions().addAll(newEx.getExceptions());
              if (newEx.isFatal()) {
                  returnEx.setFatal(true);
              }
          }
          if (returnEx.isFatal()) {
              final String msg = String.format("Fatal exception(s) analyzing %s", getProject().getName());
              if (this.isFailOnError()) {
                  throw new MojoExecutionException(msg, returnEx);
              }
              getLog().error(msg);
              if (getLog().isDebugEnabled()) {
                  getLog().debug(returnEx);
              }
          } else {
              final String msg = String.format("Exception(s) analyzing %s", getProject().getName());
              if (getLog().isDebugEnabled()) {
                  getLog().debug(msg, returnEx);
              }
          }
          return returnEx;
      }
docs: Combines the two exception collections and if either are fatal, throw an
  MojoExecutionException
  
  @param currentEx the primary exception collection
  @param newEx the new exception collection to add
  @return the combined exception collection
  @throws MojoExecutionException thrown if dependency-check is configured
  to fail on errors