Provide the reason why data is not compliant 81/119281/4
authorBruno Sakoto <bruno.sakoto@bell.ca>
Sat, 13 Mar 2021 00:21:55 +0000 (19:21 -0500)
committerRishi Chail <rishi.chail@est.tech>
Wed, 24 Mar 2021 16:08:21 +0000 (16:08 +0000)
Issue-ID: CPS-292
Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
Change-Id: Ia58a8dfcf427e373b24bb3be7436abf6abd55492

cps-service/src/main/java/org/onap/cps/utils/YangUtils.java

index 873e14c..6df973d 100644 (file)
@@ -95,8 +95,8 @@ public class YangUtils {
             jsonParserStream.parse(jsonReader);
 
         } catch (final IOException | IllegalStateException | JsonSyntaxException exception) {
-            throw new DataValidationException("Failed to parse json data.", String
-                .format("Exception occurred on parsing string %s.", jsonData), exception);
+            throw new DataValidationException(
+                    "Failed to parse json data: " + jsonData,  exception.getMessage(), exception);
         }
         return normalizedNodeResult.getResult();
     }