diff options
Diffstat (limited to 'catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java')
-rw-r--r-- | catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java index 8cfd8c7007..3676844516 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java @@ -149,7 +149,6 @@ import org.openecomp.sdc.be.model.category.CategoryDefinition; import org.openecomp.sdc.be.model.category.SubCategoryDefinition; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ArtifactsOperations; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.InterfaceOperation; -import org.openecomp.sdc.be.model.jsonjanusgraph.operations.exception.ToscaOperationException; import org.openecomp.sdc.be.model.jsonjanusgraph.utils.ModelConverter; import org.openecomp.sdc.be.model.operations.StorageException; import org.openecomp.sdc.be.model.operations.api.ICapabilityTypeOperation; @@ -1745,19 +1744,16 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { ASDCKpiApi.countCreatedResourcesKPI(); return resource; - } catch (final ComponentException | StorageException e) { - rollback(inTransaction, resource, createdArtifacts, nodeTypesNewCreatedArtifacts); - throw e; - } catch (final ToscaOperationException e) { - log.error("An error has occurred during resource and resource instance creation", e); - rollback(inTransaction, resource, createdArtifacts, nodeTypesNewCreatedArtifacts); - log.error(EcompLoggerErrorCode.BUSINESS_PROCESS_ERROR, ResourceBusinessLogic.class.getName(), - "catalog-be", e.getMessage()); - throw new ByActionStatusComponentException(ActionStatus.GENERAL_ERROR); } catch (final BusinessLogicException e) { - log.error("An error has occurred during resource and resource instance creation", e); + log.error(EcompLoggerErrorCode.BUSINESS_PROCESS_ERROR, ResourceBusinessLogic.class.getName(), + "An error has occurred during resource and resource instance creation", e); rollback(inTransaction, resource, createdArtifacts, nodeTypesNewCreatedArtifacts); throw new ByResponseFormatComponentException(e.getResponseFormat()); + } catch (final Exception e) { + log.error(EcompLoggerErrorCode.BUSINESS_PROCESS_ERROR, ResourceBusinessLogic.class.getName(), + "An error has occurred during resource and resource instance creation", e); + rollback(inTransaction, resource, createdArtifacts, nodeTypesNewCreatedArtifacts); + throw new ByActionStatusComponentException(ActionStatus.GENERAL_ERROR); } finally { if (!inTransaction) { janusGraphDao.commit(); |