code: public void throwMojoException(String msg, Throwable e) throws MojoExecutionException {
          if (failOnError) {
              throw new MojoExecutionException(msg, e);
          } else {
              getLog().error(msg, e);
          }
      }
docs: If "failOnError" is enabled, throws a MojoExecutionException. Otherwise, logs the exception
  and resumes execution.
  
  @param msg The exception message.
  @param e The original exceptions.
  @throws MojoExecutionException Thrown exception.