class PluginExecutionException extends PluginManagerException {

    private final MojoExecution mojoExecution;

    public PluginExecutionException(MojoExecution mojoExecution, MavenProject project, String message) {
        super(mojoExecution.getMojoDescriptor(), project, message);
        this.mojoExecution = mojoExecution;
    }

    public PluginExecutionException(
            MojoExecution mojoExecution, MavenProject project, String message, Throwable cause) {
        super(mojoExecution.getMojoDescriptor(), project, message, cause);
        this.mojoExecution = mojoExecution;
    }

    public PluginExecutionException(MojoExecution mojoExecution, MavenProject project, Exception cause) {
        super(mojoExecution.getMojoDescriptor(), project, constructMessage(mojoExecution, cause), cause);
        this.mojoExecution = mojoExecution;
    }

    public PluginExecutionException(
            MojoExecution mojoExecution, MavenProject project, DuplicateArtifactAttachmentException cause) {
        super(mojoExecution.getMojoDescriptor(), project, constructMessage(mojoExecution, cause), cause);
        this.mojoExecution = mojoExecution;
    }

    public MojoExecution getMojoExecution() {
        return mojoExecution;
    }

    private static String constructMessage(MojoExecution mojoExecution, Throwable cause) {<FILL_FUNCTION_BODY>}
}

        String message;

        if (mojoExecution != null) {
            message = "Execution " + mojoExecution.getExecutionId() + " of goal "
                    + mojoExecution.getMojoDescriptor().getId() + " failed";
        } else {
            message = "Mojo execution failed";
        }

        if (cause != null && cause.getMessage() != null && !cause.getMessage().isEmpty()) {
            message += ": " + cause.getMessage();
        } else {
            message += ".";
        }

        return message;
    
<methods>public void <init>(Plugin, java.lang.String, java.lang.Throwable) ,public void <init>(Plugin, org.apache.maven.artifact.versioning.InvalidVersionSpecificationException) ,public void <init>(Plugin, java.lang.String, org.codehaus.plexus.configuration.PlexusConfigurationException) ,public void <init>(Plugin, java.lang.String, org.codehaus.plexus.component.repository.exception.ComponentRepositoryException) ,public void <init>(org.apache.maven.plugin.descriptor.MojoDescriptor, org.apache.maven.project.MavenProject, java.lang.String, org.codehaus.plexus.classworlds.realm.NoSuchRealmException) ,public void <init>(org.apache.maven.plugin.descriptor.MojoDescriptor, java.lang.String, org.apache.maven.project.MavenProject, org.codehaus.plexus.PlexusContainerException) ,public void <init>(Plugin, java.lang.String, org.codehaus.plexus.PlexusContainerException) ,public void <init>(Plugin, java.lang.String, org.apache.maven.project.MavenProject) ,public java.lang.String getGoal() ,public java.lang.String getPluginArtifactId() ,public java.lang.String getPluginGroupId() ,public java.lang.String getPluginVersion() ,public org.apache.maven.project.MavenProject getProject() <variables>private java.lang.String goal,private final non-sealed java.lang.String pluginArtifactId,private final non-sealed java.lang.String pluginGroupId,private final non-sealed java.lang.String pluginVersion,private org.apache.maven.project.MavenProject project