summaryrefslogtreecommitdiffstats
path: root/csarvalidation/src/main/java
diff options
context:
space:
mode:
authorBartosz Gardziejewski <bartosz.gardziejewski@nokia.com>2020-08-18 13:31:29 +0200
committerBartosz Gardziejewski <bartosz.gardziejewski@nokia.com>2020-08-20 07:15:03 +0200
commit7be0ab69d0828950c1601566ae9857a104e7124d (patch)
treefaf4e99b60317ccc1d22c08f35ee72998e776d16 /csarvalidation/src/main/java
parente937fd80bf7b33e1dc900dd0ecce6dfcddaacf7d (diff)
Wrap exceptions connected with Yaml parsing in order to send them as validation error.
Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> Change-Id: Iae6c0948746bb903945de1796b6f42952d4072ba Issue-ID: VNFSDK-644
Diffstat (limited to 'csarvalidation/src/main/java')
-rw-r--r--csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR816745.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR816745.java b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR816745.java
index f1bbffc..a929418 100644
--- a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR816745.java
+++ b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR816745.java
@@ -24,6 +24,7 @@ import org.onap.validation.yaml.error.YamlDocumentValidationError;
import org.onap.validation.yaml.exception.YamlProcessingException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.yaml.snakeyaml.error.YAMLException;
import java.nio.file.Path;
import java.util.List;
@@ -83,7 +84,7 @@ public class VTPValidateCSARR816745 extends VTPValidateCSARBase {
List<YamlDocumentValidationError> validationErrors =
new YamlFileValidator().validateYamlFileWithSchema(rootPath+artifactPath);
addAllErrorsReportedByVaidator(artifactPath, validationErrors);
- } catch (YamlProcessingException e) {
+ } catch (YamlProcessingException | YAMLException e) {
LOGGER.error("Failed to load PM_Dictionary file.", e);
errors.add(new CSARPmDictionaryLoadingError(
artifactPath,