summaryrefslogtreecommitdiffstats
path: root/cps-service
diff options
context:
space:
mode:
authorBruno Sakoto <bruno.sakoto@bell.ca>2021-03-12 19:21:55 -0500
committerRishi Chail <rishi.chail@est.tech>2021-03-29 09:50:55 +0000
commitaaad3baa21c0b483e31efbc1482e7bf090622f84 (patch)
treec09bd1ed4cfd0fef3c3c99f63dd441e1206bd2b8 /cps-service
parent386658dbc8d2bf156a29537c5edb80ba574abb17 (diff)
Provide the reason why data is not compliant
Issue-ID: CPS-292 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: Ia58a8dfcf427e373b24bb3be7436abf6abd55492
Diffstat (limited to 'cps-service')
-rw-r--r--cps-service/src/main/java/org/onap/cps/utils/YangUtils.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/utils/YangUtils.java b/cps-service/src/main/java/org/onap/cps/utils/YangUtils.java
index 733378ecba..2c6bc1c927 100644
--- a/cps-service/src/main/java/org/onap/cps/utils/YangUtils.java
+++ b/cps-service/src/main/java/org/onap/cps/utils/YangUtils.java
@@ -93,9 +93,9 @@ public class YangUtils {
final JsonReader jsonReader = new JsonReader(new StringReader(jsonData));
jsonParserStream.parse(jsonReader);
- } catch (final IOException | IllegalStateException e) {
- throw new DataValidationException("Failed to parse json data.", String
- .format("Exception occurred on parsing string %s.", jsonData), e);
+ } catch (final IOException | IllegalStateException exception) {
+ throw new DataValidationException(
+ "Failed to parse json data: " + jsonData, exception.getMessage(), exception);
}
return normalizedNodeResult.getResult();
}