Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 131341 Details for
Bug 271681
[transport][ui] Details error message not shown in the UI
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Surface Error Messages
ErrorMessages.patch (text/plain), 6.66 KB, created by
Matthew Piggott
on 2009-04-08 17:06:52 EDT
(
hide
)
Description:
Surface Error Messages
Filename:
MIME Type:
Creator:
Matthew Piggott
Created:
2009-04-08 17:06:52 EDT
Size:
6.66 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.p2.ui >Index: src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RepositoryManipulationPage.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RepositoryManipulationPage.java,v >retrieving revision 1.11 >diff -u -r1.11 RepositoryManipulationPage.java >--- src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RepositoryManipulationPage.java 30 Mar 2009 01:48:58 -0000 1.11 >+++ src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RepositoryManipulationPage.java 8 Apr 2009 20:39:34 -0000 >@@ -10,8 +10,6 @@ > *******************************************************************************/ > package org.eclipse.equinox.internal.provisional.p2.ui.dialogs; > >-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent; >- > import java.lang.reflect.InvocationTargetException; > import java.net.URI; > import java.util.ArrayList; >@@ -25,6 +23,7 @@ > import org.eclipse.equinox.internal.p2.ui.viewers.MetadataRepositoryElementComparator; > import org.eclipse.equinox.internal.p2.ui.viewers.RepositoryDetailsLabelProvider; > import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException; >+import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent; > import org.eclipse.equinox.internal.provisional.p2.ui.*; > import org.eclipse.equinox.internal.provisional.p2.ui.model.MetadataRepositories; > import org.eclipse.equinox.internal.provisional.p2.ui.operations.*; >@@ -572,10 +571,15 @@ > // nothing to report > } > if (fail[0] != null) { >- if (fail[0].getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND) { >- ProvUI.reportNotFoundStatus(location, fail[0].getStatus(), StatusManager.SHOW); >- } else >- ProvUI.handleException(fail[0], null, StatusManager.SHOW); >+ switch (fail[0].getStatus().getCode()) { >+ case ProvisionException.REPOSITORY_FAILED_READ : >+ case ProvisionException.REPOSITORY_NOT_FOUND : >+ case ProvisionException.REPOSITORY_INVALID_LOCATION : >+ ProvUI.reportNotFoundStatus(location, fail[0].getStatus(), StatusManager.SHOW); >+ break; >+ default : >+ ProvUI.handleException(fail[0], null, StatusManager.SHOW); >+ } > } > repositoryViewer.update(selected[0], null); > setDetails(); >#P org.eclipse.equinox.p2.repository >Index: src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java,v >retrieving revision 1.1 >diff -u -r1.1 RepositoryStatus.java >--- src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java 17 Mar 2009 12:49:19 -0000 1.1 >+++ src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java 8 Apr 2009 20:26:29 -0000 >@@ -119,7 +119,7 @@ > if (t instanceof ConnectException) > return new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, NLS.bind(Messages.TransportErrorTranslator_UnableToConnectToRepository_0, toDownload), t); > if (t instanceof UnknownHostException) >- return new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_INVALID_LOCATION, NLS.bind(Messages.TransportErrorTranslator_UnknownHost, toDownload), t); >+ return new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_INVALID_LOCATION, NLS.bind(Messages.TransportErrorTranslator_UnknownHost, toDownload.getHost()), t); > if (t instanceof IDCreateException) { > IStatus status = ((IDCreateException) t).getStatus(); > if (status != null && status.getException() != null) >#P org.eclipse.equinox.p2.artifact.repository >Index: src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepositoryFactory.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepositoryFactory.java,v >retrieving revision 1.12 >diff -u -r1.12 CompositeArtifactRepositoryFactory.java >--- src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepositoryFactory.java 2 Apr 2009 21:18:25 -0000 1.12 >+++ src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepositoryFactory.java 8 Apr 2009 20:44:54 -0000 >@@ -67,7 +67,9 @@ > compress = false; > status = getTransport().download(CompositeArtifactRepository.getActualLocation(location, compress), artifacts, sub.newChild(100)); > if (!status.isOK()) >- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, status.getMessage(), null)); >+ if (status.getException() instanceof FileNotFoundException) >+ throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, status.getMessage(), null)); >+ throw new ProvisionException(status); > } > } finally { > if (artifacts != null) >Index: src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/SimpleArtifactRepositoryFactory.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/SimpleArtifactRepositoryFactory.java,v >retrieving revision 1.10 >diff -u -r1.10 SimpleArtifactRepositoryFactory.java >--- src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/SimpleArtifactRepositoryFactory.java 2 Apr 2009 21:18:25 -0000 1.10 >+++ src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/SimpleArtifactRepositoryFactory.java 8 Apr 2009 20:44:54 -0000 >@@ -67,8 +67,11 @@ > // retry uncompressed > compress = false; > status = getTransport().download(SimpleArtifactRepository.getActualLocation(location, compress), artifacts, sub.newChild(100)); >- if (!status.isOK()) >- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, status.getMessage(), null)); >+ if (!status.isOK()) { >+ if (status.getException() instanceof FileNotFoundException) >+ throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, status.getMessage(), null)); >+ throw new ProvisionException(status); >+ } > } > } finally { > if (artifacts != null)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 271681
:
131341
|
132091
|
132094