Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGéry Deloge2016-07-07 10:50:52 +0000
committerGerrit Code Review @ Eclipse.org2016-08-25 08:42:52 +0000
commit43a2acc2e06572cc0c059fb1d1f4b786c0a4894e (patch)
tree6b310f6c036773b16a2b67ccde7fe75df8a2b067 /plugins/infra/core
parentc123e4285d054c79488ef5639a4155be12d2d6c0 (diff)
downloadorg.eclipse.papyrus-43a2acc2e06572cc0c059fb1d1f4b786c0a4894e.tar.gz
org.eclipse.papyrus-43a2acc2e06572cc0c059fb1d1f4b786c0a4894e.tar.xz
org.eclipse.papyrus-43a2acc2e06572cc0c059fb1d1f4b786c0a4894e.zip
Bug 496842: ResourceException below ModelSet.demandLoad
Change-Id: I0e65381e4f25cee9e9c045c72b9bc7f0a2ec8330 Signed-off-by: Géry Deloge <gery.deloge@cea.fr>
Diffstat (limited to 'plugins/infra/core')
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelSet.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelSet.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelSet.java
index 4aad7200d86..bb7c9abc4b3 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelSet.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ModelSet.java
@@ -207,7 +207,7 @@ public class ModelSet extends ResourceSetImpl {
}
@Override
- public Resource getResource(URI uri, boolean loadOnDemand) {
+ public Resource getResource(URI uri, boolean loadOnDemand) throws WrappedException {
if (uri.hasFragment()) {
Activator.log.warn("Invalid Resource URI: resource URIs cannot contain a fragment"); //$NON-NLS-1$
uri = uri.trimFragment(); // Fix and continue
@@ -218,9 +218,10 @@ public class ModelSet extends ResourceSetImpl {
} catch (WrappedException e) {
// Activator.log.error(e);
if (ModelUtils.isDegradedModeAllowed(e.getCause())) {
- r = super.getResource(uri, false);
- if (r == null) {
- throw e;
+ try {
+ r = super.getResource(uri, false);
+ } catch (WrappedException ee) {
+ throw ee;
}
} else {
// don't log, but throw error again, bug 405047 - [core] FileNotFoundException during MARTE profile loads

Back to the top