o Fixed exception reporting

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@801591 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-08-06 10:24:05 +00:00
parent e3b41a9457
commit cbfc593e6e
1 changed files with 11 additions and 0 deletions

View File

@ -30,6 +30,7 @@ import org.apache.maven.plugin.PluginDescriptorParsingException;
import org.apache.maven.plugin.PluginNotFoundException;
import org.apache.maven.plugin.PluginResolutionException;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.util.StringUtils;
/*
@ -124,10 +125,20 @@ public class DefaultExceptionHandler
else if ( exception instanceof MojoFailureException )
{
message = ((MojoFailureException)exception).getLongMessage();
if ( StringUtils.isEmpty( message ) )
{
message = exception.getMessage();
}
}
else if ( exception instanceof MojoExecutionException )
{
message = ((MojoExecutionException)exception).getLongMessage();
if ( StringUtils.isEmpty( message ) )
{
message = exception.getMessage();
}
}
else