Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 271681 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RepositoryManipulationPage.java (-6 / +10 lines)
Lines 10-17 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
11
package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
12
12
13
import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
14
15
import java.lang.reflect.InvocationTargetException;
13
import java.lang.reflect.InvocationTargetException;
16
import java.net.URI;
14
import java.net.URI;
17
import java.util.ArrayList;
15
import java.util.ArrayList;
Lines 25-30 Link Here
25
import org.eclipse.equinox.internal.p2.ui.viewers.MetadataRepositoryElementComparator;
23
import org.eclipse.equinox.internal.p2.ui.viewers.MetadataRepositoryElementComparator;
26
import org.eclipse.equinox.internal.p2.ui.viewers.RepositoryDetailsLabelProvider;
24
import org.eclipse.equinox.internal.p2.ui.viewers.RepositoryDetailsLabelProvider;
27
import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
25
import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
26
import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
28
import org.eclipse.equinox.internal.provisional.p2.ui.*;
27
import org.eclipse.equinox.internal.provisional.p2.ui.*;
29
import org.eclipse.equinox.internal.provisional.p2.ui.model.MetadataRepositories;
28
import org.eclipse.equinox.internal.provisional.p2.ui.model.MetadataRepositories;
30
import org.eclipse.equinox.internal.provisional.p2.ui.operations.*;
29
import org.eclipse.equinox.internal.provisional.p2.ui.operations.*;
Lines 572-581 Link Here
572
			// nothing to report
571
			// nothing to report
573
		}
572
		}
574
		if (fail[0] != null) {
573
		if (fail[0] != null) {
575
			if (fail[0].getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND) {
574
			switch (fail[0].getStatus().getCode()) {
576
				ProvUI.reportNotFoundStatus(location, fail[0].getStatus(), StatusManager.SHOW);
575
				case ProvisionException.REPOSITORY_FAILED_READ :
577
			} else
576
				case ProvisionException.REPOSITORY_NOT_FOUND :
578
				ProvUI.handleException(fail[0], null, StatusManager.SHOW);
577
				case ProvisionException.REPOSITORY_INVALID_LOCATION :
578
					ProvUI.reportNotFoundStatus(location, fail[0].getStatus(), StatusManager.SHOW);
579
					break;
580
				default :
581
					ProvUI.handleException(fail[0], null, StatusManager.SHOW);
582
			}
579
		}
583
		}
580
		repositoryViewer.update(selected[0], null);
584
		repositoryViewer.update(selected[0], null);
581
		setDetails();
585
		setDetails();
(-)src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java (-1 / +1 lines)
Lines 119-125 Link Here
119
		if (t instanceof ConnectException)
119
		if (t instanceof ConnectException)
120
			return new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, NLS.bind(Messages.TransportErrorTranslator_UnableToConnectToRepository_0, toDownload), t);
120
			return new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, NLS.bind(Messages.TransportErrorTranslator_UnableToConnectToRepository_0, toDownload), t);
121
		if (t instanceof UnknownHostException)
121
		if (t instanceof UnknownHostException)
122
			return new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_INVALID_LOCATION, NLS.bind(Messages.TransportErrorTranslator_UnknownHost, toDownload), t);
122
			return new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_INVALID_LOCATION, NLS.bind(Messages.TransportErrorTranslator_UnknownHost, toDownload.getHost()), t);
123
		if (t instanceof IDCreateException) {
123
		if (t instanceof IDCreateException) {
124
			IStatus status = ((IDCreateException) t).getStatus();
124
			IStatus status = ((IDCreateException) t).getStatus();
125
			if (status != null && status.getException() != null)
125
			if (status != null && status.getException() != null)
(-)src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepositoryFactory.java (-1 / +3 lines)
Lines 67-73 Link Here
67
						compress = false;
67
						compress = false;
68
						status = getTransport().download(CompositeArtifactRepository.getActualLocation(location, compress), artifacts, sub.newChild(100));
68
						status = getTransport().download(CompositeArtifactRepository.getActualLocation(location, compress), artifacts, sub.newChild(100));
69
						if (!status.isOK())
69
						if (!status.isOK())
70
							throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, status.getMessage(), null));
70
							if (status.getException() instanceof FileNotFoundException)
71
								throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, status.getMessage(), null));
72
						throw new ProvisionException(status);
71
					}
73
					}
72
				} finally {
74
				} finally {
73
					if (artifacts != null)
75
					if (artifacts != null)
(-)src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/SimpleArtifactRepositoryFactory.java (-2 / +5 lines)
Lines 67-74 Link Here
67
						// retry uncompressed
67
						// retry uncompressed
68
						compress = false;
68
						compress = false;
69
						status = getTransport().download(SimpleArtifactRepository.getActualLocation(location, compress), artifacts, sub.newChild(100));
69
						status = getTransport().download(SimpleArtifactRepository.getActualLocation(location, compress), artifacts, sub.newChild(100));
70
						if (!status.isOK())
70
						if (!status.isOK()) {
71
							throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, status.getMessage(), null));
71
							if (status.getException() instanceof FileNotFoundException)
72
								throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, status.getMessage(), null));
73
							throw new ProvisionException(status);
74
						}
72
					}
75
					}
73
				} finally {
76
				} finally {
74
					if (artifacts != null)
77
					if (artifacts != null)

Return to bug 271681