o Polished error reporting

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@881305 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-11-17 14:41:17 +00:00
parent 0f465258e5
commit b48f4f4e49
2 changed files with 4 additions and 3 deletions

View File

@ -114,7 +114,7 @@ public class DefaultBuildPluginManager
throw new PluginExecutionException( mojoExecution, project, e ); throw new PluginExecutionException( mojoExecution, project, e );
} }
} }
catch ( PluginManagerException e ) catch ( PluginContainerException e )
{ {
throw new PluginExecutionException( mojoExecution, project, e ); throw new PluginExecutionException( mojoExecution, project, e );
} }

View File

@ -21,6 +21,7 @@ package org.apache.maven.plugin;
import org.apache.maven.project.DuplicateArtifactAttachmentException; import org.apache.maven.project.DuplicateArtifactAttachmentException;
import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.StringUtils;
public class PluginExecutionException public class PluginExecutionException
extends PluginManagerException extends PluginManagerException
@ -72,9 +73,9 @@ public class PluginExecutionException
message = "Mojo execution failed"; message = "Mojo execution failed";
} }
if ( cause != null ) if ( cause != null && StringUtils.isNotEmpty( cause.getMessage() ) )
{ {
message = ": " + cause.getMessage(); message += ": " + cause.getMessage();
} }
else else
{ {