use of io.fabric8.api.PatchException in project fabric8 by jboss-fuse.
the class RollbackAction method doExecute.
@Override
protected void doExecute(Service service) throws Exception {
Patch patch = service.getPatch(patchId);
if (patch == null) {
throw new PatchException("Patch '" + patchId + "' not found");
}
if (!patch.isInstalled()) {
throw new PatchException("Patch '" + patchId + "' is not installed");
}
if (patch.getPatchData().getMigratorBundle() != null) {
throw new PatchException("Patch '" + patchId + "' does not support rollback");
}
service.rollback(patch, simulation, false);
}
Aggregations