mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-16 02:06:18 +01:00
Improve logging for failures during plugin installation
This commit is contained in:
@@ -192,10 +192,16 @@ public class DefaultPluginManager implements PluginManager {
|
|||||||
dependencyTracker.addInstalled(plugin.getDescriptor());
|
dependencyTracker.addInstalled(plugin.getDescriptor());
|
||||||
pendingInstallations.add(pending);
|
pendingInstallations.add(pending);
|
||||||
eventBus.post(new PluginEvent(PluginEvent.PluginEventType.INSTALLED, plugin));
|
eventBus.post(new PluginEvent(PluginEvent.PluginEventType.INSTALLED, plugin));
|
||||||
} catch (PluginInstallException ex) {
|
} catch (PluginInstallException installException) {
|
||||||
|
try {
|
||||||
cancelPending(pendingInstallations);
|
cancelPending(pendingInstallations);
|
||||||
|
} catch (PluginFailedToCancelInstallationException cancelInstallationException) {
|
||||||
|
LOG.error("could not install plugin {}; uninstallation failed (see next exception)", plugin.getDescriptor().getInformation().getName(), installException);
|
||||||
|
throw cancelInstallationException;
|
||||||
|
} finally {
|
||||||
eventBus.post(new PluginEvent(PluginEvent.PluginEventType.INSTALLATION_FAILED, plugin));
|
eventBus.post(new PluginEvent(PluginEvent.PluginEventType.INSTALLATION_FAILED, plugin));
|
||||||
throw ex;
|
}
|
||||||
|
throw installException;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user