summaryrefslogtreecommitdiffstats
path: root/examples/examples-servlet
diff options
context:
space:
mode:
Diffstat (limited to 'examples/examples-servlet')
-rw-r--r--examples/examples-servlet/src/main/java/org/onap/policy/apex/examples/servlet/ApexServletListener.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/examples-servlet/src/main/java/org/onap/policy/apex/examples/servlet/ApexServletListener.java b/examples/examples-servlet/src/main/java/org/onap/policy/apex/examples/servlet/ApexServletListener.java
index 80ef7354b..3375ff869 100644
--- a/examples/examples-servlet/src/main/java/org/onap/policy/apex/examples/servlet/ApexServletListener.java
+++ b/examples/examples-servlet/src/main/java/org/onap/policy/apex/examples/servlet/ApexServletListener.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -75,7 +76,11 @@ public class ApexServletListener implements ServletContextListener {
}
// Initialize apex
- apexMain = new ApexMain(argsList.toArray(new String[argsList.size()]));
+ try {
+ apexMain = new ApexMain(argsList.toArray(new String[argsList.size()]));
+ } catch (ApexException e) {
+ LOGGER.error("Apex Engine initialization failed", e);
+ }
}