diff options
Diffstat (limited to 'core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/EngineServiceFacade.java')
-rw-r--r-- | core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/EngineServiceFacade.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/EngineServiceFacade.java b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/EngineServiceFacade.java index 9b24bcd96..e27bf5d07 100644 --- a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/EngineServiceFacade.java +++ b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/EngineServiceFacade.java @@ -195,7 +195,7 @@ public class EngineServiceFacade { * @throws IOException on IO exceptions from the operating system */ public void deployModel(final String modelFileName, final boolean ignoreConflicts, final boolean force) - throws ApexException, IOException { + throws ApexException { if (engineServiceKey == null || engineKeyArray == null || engineKeyArray.length == 0) { LOGGER.error("cound not deploy apex model, deployer is not initialized"); throw new ApexDeploymentException("cound not deploy apex model, deployer is not initialized"); @@ -212,7 +212,13 @@ public class EngineServiceFacade { } } - deployModel(modelFileName, apexModelUrl.openStream(), ignoreConflicts, force); + try { + deployModel(modelFileName, apexModelUrl.openStream(), ignoreConflicts, force); + } catch (Exception deployException) { + String errorMessage = "could not deploy apex model from " + modelFileName; + LOGGER.error(errorMessage, deployException); + throw new ApexDeploymentException(errorMessage, deployException); + } } /** |