/** * Calls {@link #doExecute()}, checking exceptions and error logs. * If {@code doExecute()} throws a {@link MojoExecutionException} or a * {@link MojoFailureException}, then a new error log entry gets generated * and the exception gets rethrown. * Otherwise, if any error log entries have been previously generated, * then a new {@code MojoFailureException} gets thrown. * * @throws MojoExecutionException If {@link #doExecute()} throws an * exception of this type. * @throws MojoFailureException If {@link #doExecute()} throws an * exception of this type or if any error log entries have been * generated using the logger returned by {@link #getLog()}. */ @Override public final void execute() throws MojoExecutionException, MojoFailureException { try { doExecute(); } catch (final MojoExecutionException e) { getLog().error(e.toString(), e); throw e; } catch (final MojoFailureException e) { getLog().error(e.toString(), e); throw e; } if (null != checkedLog) checkedLog.check(); }