summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/openecomp/sdc/toscaparser/api/ImportsLoader.java4
-rw-r--r--src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java8
2 files changed, 9 insertions, 3 deletions
diff --git a/src/main/java/org/openecomp/sdc/toscaparser/api/ImportsLoader.java b/src/main/java/org/openecomp/sdc/toscaparser/api/ImportsLoader.java
index 1fac3f1..5e94378 100644
--- a/src/main/java/org/openecomp/sdc/toscaparser/api/ImportsLoader.java
+++ b/src/main/java/org/openecomp/sdc/toscaparser/api/ImportsLoader.java
@@ -362,13 +362,13 @@ public class ImportsLoader {
}
catch(FileNotFoundException e) {
ThreadLocalsHolder.getCollector().appendValidationIssue(new JToscaValidationIssue("JE197", String.format(
- "ImportError: Failed to load YAML from \"%s\"",importName)));
+ "ImportError: Failed to load YAML from \"%s\"" + e,importName)));
al[0] = al[1] = null;
return al;
}
catch(Exception e) {
ThreadLocalsHolder.getCollector().appendValidationIssue(new JToscaValidationIssue("JE198", String.format(
- "ImportError: Exception from SnakeYAML file = \"%s\"",importName)));
+ "ImportError: Exception from SnakeYAML file = \"%s\"" + e,importName)));
al[0] = al[1] = null;
return al;
}
diff --git a/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java b/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java
index d4506e1..07cce1c 100644
--- a/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java
+++ b/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java
@@ -153,10 +153,16 @@ public class ToscaTemplate extends Object {
}
catch (FileNotFoundException e) {
log.error("ToscaTemplate - Exception loading yaml: {}", e.getMessage());
+ log.error("Exception", e);
+ ThreadLocalsHolder.getCollector().appendValidationIssue(new JToscaValidationIssue("JE275",
+ "ToscaTemplate - Exception loading yaml: -> " + e.getMessage()));
return;
}
catch(Exception e) {
- log.error("ToscaTemplate - Error loading yaml, aborting");
+ log.error("ToscaTemplate - Error loading yaml, aborting -> ", e.getMessage());
+ log.error("Exception", e);
+ ThreadLocalsHolder.getCollector().appendValidationIssue(new JToscaValidationIssue("JE275",
+ "ToscaTemplate - Error loading yaml, aborting -> " + e.getMessage()));
return;
}