brett       2005/03/20 20:24:45

  Modified:    maven-core/src/main/java/org/apache/maven DefaultMaven.java
  Log:
  improve error handling
  
  Revision  Changes    Path
  1.42      +12 -3     
maven-components/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
  
  Index: DefaultMaven.java
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/DefaultMaven.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- DefaultMaven.java 21 Mar 2005 01:48:44 -0000      1.41
  +++ DefaultMaven.java 21 Mar 2005 04:24:45 -0000      1.42
  @@ -225,9 +225,18 @@
           if ( response.isExecutionFailure() )
           {
               // TODO: yuck! Revisit when cleaning up the exception handling 
from the top down
  -            if ( response.getException() instanceof PluginExecutionException 
)
  +            Throwable exception = response.getException();
  +
  +            if ( exception instanceof PluginExecutionException )
               {
  -                logFailure( response, (PluginExecutionException) 
response.getException() );
  +                if ( exception.getCause() == null )
  +                {
  +                    logFailure( response, (PluginExecutionException) 
exception );
  +                }
  +                else
  +                {
  +                    logError( response );
  +                }
               }
               else
               {
  
  
  

Reply via email to