Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2020-04-01 20:46:41 +0000
committerThomas Watson2020-04-01 20:46:41 +0000
commit5d5d03a8fc7415cd0f8f1a874be29c64ea938cfe (patch)
tree3bdef7b373ca08644bf6466c822e3c40ed84cc99 /bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/FrameworkExtensionInstaller.java
parent057efc46638dc24e2ed6cf5d5bddf2ae7f05d740 (diff)
downloadrt.equinox.framework-5d5d03a8fc7415cd0f8f1a874be29c64ea938cfe.tar.gz
rt.equinox.framework-5d5d03a8fc7415cd0f8f1a874be29c64ea938cfe.tar.xz
rt.equinox.framework-5d5d03a8fc7415cd0f8f1a874be29c64ea938cfe.zip
Improve exception methods to include information about the bundle related to the exception. This is not an exhaustive change, but it does improve many of the common error that can happen when a bundle is uninstalled or a bundle context is invalid or a service is unregistered. Change-Id: I983a1fb4750f24259df71f73b4646134c3f1cc26 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/FrameworkExtensionInstaller.java')
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/FrameworkExtensionInstaller.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/FrameworkExtensionInstaller.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/FrameworkExtensionInstaller.java
index 5737b0c98..30137006d 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/FrameworkExtensionInstaller.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/FrameworkExtensionInstaller.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2017 IBM Corporation and others.
+ * Copyright (c) 2013, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -152,7 +152,7 @@ public class FrameworkExtensionInstaller {
callAddFilePathMethod(file);
}
} catch (InvocationTargetException | MalformedURLException e) {
- throw new BundleException("Error adding extension content.", e); //$NON-NLS-1$
+ throw new BundleException("Error adding extension content. " + revision, e); //$NON-NLS-1$
}
}
}
@@ -268,7 +268,8 @@ public class FrameworkExtensionInstaller {
} catch (Throwable e) {
BundleException eventException;
if (activator == null) {
- eventException = new BundleException(Msg.BundleContextImpl_LoadActivatorError, BundleException.ACTIVATOR_ERROR, e);
+ eventException = new BundleException(Msg.BundleContextImpl_LoadActivatorError + ' ' + extensionRevision,
+ BundleException.ACTIVATOR_ERROR, e);
} else {
eventException = new BundleException(NLS.bind(Msg.BUNDLE_ACTIVATOR_EXCEPTION, new Object[] {activator.getClass(), "start", extensionRevision.getSymbolicName()}), BundleException.ACTIVATOR_ERROR, e); //$NON-NLS-1$
}

Back to the top