aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java4
-rw-r--r--core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/EngineServiceFacade.java10
2 files changed, 10 insertions, 4 deletions
diff --git a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java
index 321d61583..1748a0663 100644
--- a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java
+++ b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java
@@ -83,7 +83,7 @@ public class BatchDeployer {
* @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 {
engineServiceFacade.deployModel(modelFileName, ignoreConflicts, force);
}
@@ -144,7 +144,7 @@ public class BatchDeployer {
deployer.init();
deployer.deployModel(args[2], false, false);
deployer.startEngines();
- } catch (final ApexException | IOException e) {
+ } catch (final ApexException e) {
LOGGER.error("model deployment failed on parameters {}", args, e);
} finally {
if (deployer != null) {
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);
+ }
}
/**