Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Bull2010-03-30 18:26:28 -0400
committerIan Bull2010-03-30 18:26:28 -0400
commit3ad938e16227692213f76b5b58571cc8549eb171 (patch)
treeed632a00d3f30d7614f5a06bad2e8fc33f56bc1c /bundles/org.eclipse.equinox.p2.artifact.repository
parent8ddf94526a1ff72f60b38fabfa1932c004d2d82b (diff)
downloadrt.equinox.p2-3ad938e16227692213f76b5b58571cc8549eb171.tar.gz
rt.equinox.p2-3ad938e16227692213f76b5b58571cc8549eb171.tar.xz
rt.equinox.p2-3ad938e16227692213f76b5b58571cc8549eb171.zip
bug 305237: [repository] Handle operation cancelled exception in execute batch
https://bugs.eclipse.org/bugs/show_bug.cgi?id=305237
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.artifact.repository')
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java2
2 files changed, 4 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
index e0e4b0d5d..04167f75d 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
@@ -568,6 +568,8 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
try {
disableSave = true;
runnable.run(monitor);
+ } catch (OperationCanceledException oce) {
+ return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce);
} catch (Throwable e) {
result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
} finally {
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
index 1192a5d91..1bb37ed04 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
@@ -1042,6 +1042,8 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
try {
disableSave = true;
runnable.run(monitor);
+ } catch (OperationCanceledException oce) {
+ return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce);
} catch (Throwable e) {
result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
} finally {

Back to the top