continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ken...@apache.org
Subject svn commit: r446648 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
Date Fri, 15 Sep 2006 16:00:49 GMT
Author: kenney
Date: Fri Sep 15 09:00:48 2006
New Revision: 446648

URL: http://svn.apache.org/viewvc?view=rev&rev=446648
Log:
Detect a cancelled build and use appropriate exception/message

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java?view=diff&rev=446648&r1=446647&r2=446648
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
Fri Sep 15 09:00:48 2006
@@ -29,6 +29,7 @@
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.cli.CommandLineException;
 
 import java.io.File;
 import java.util.Iterator;
@@ -192,6 +193,20 @@
             getLogger().info( "Exit code: " + result.getExitCode() );
 
             return new ContinuumBuildExecutionResult( FileUtils.fileRead( output ), result.getExitCode()
);
+        }
+        catch ( CommandLineException e )
+        {
+            if ( e.getCause() instanceof InterruptedException )
+            {
+                throw new ContinuumBuildCancelledException( "The build was cancelled", e
);
+            }
+            else
+            {
+                throw new ContinuumBuildExecutorException(
+                    "Error while executing shell command. The most common error is that '"
+ executable + "' "
+                        + "is not in your path.",
+                    e );
+            }
         }
         catch ( Exception e )
         {



Mime
View raw message