jruaux 2003/01/15 08:30:56
Modified: Eclipse-Plugin/src/java/org/apache/cactus/eclipse/containers/ant
StartServerHelper.java
Log:
Exception handling for progress monitor
Revision Changes Path
1.8 +8 -2
jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/containers/ant/StartServerHelper.java
Index: StartServerHelper.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/containers/ant/StartServerHelper.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- StartServerHelper.java 15 Jan 2003 10:38:17 -0000 1.7
+++ StartServerHelper.java 15 Jan 2003 16:30:56 -0000 1.8
@@ -63,6 +63,7 @@
import java.net.HttpURLConnection;
import java.net.URL;
+import org.apache.cactus.eclipse.ui.CactusMessages;
import org.apache.tools.ant.BuildException;
import org.eclipse.ant.core.AntRunner;
import org.eclipse.core.runtime.CoreException;
@@ -168,7 +169,11 @@
pm.worked(1);
continue;
}
-
+ if (pm.isCanceled())
+ {
+ throw new BuildException(
+ CactusMessages.getString("ContainerStart.message.failed"));
+ }
break;
}
@@ -268,7 +273,8 @@
}
catch (CoreException e)
{
- throw new BuildException(e);
+ // An error or cancelation has occured during the start build
+ pm.setCanceled(true);
}
// Since the target is blocking this point will be reached
// when the server is stopped.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>