You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by GitBox <gi...@apache.org> on 2019/04/01 16:24:41 UTC

[GitHub] [incubator-daffodil] jadams-tresys commented on a change in pull request #204: Provide more detail for failed assertions

jadams-tresys commented on a change in pull request #204: Provide more detail for failed assertions
URL: https://github.com/apache/incubator-daffodil/pull/204#discussion_r270948702
 
 

 ##########
 File path: daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/AssertPatternParsers.scala
 ##########
 @@ -75,7 +76,9 @@ class AssertPatternParser(
       val isMatch = dis.lookingAt(m, start)
       if (!isMatch) {
         val message = getAssertFailureMessage(start)
-        val diag = new AssertionFailed(context.schemaFileLocation, start, message)
+        val currentElem = start.infoset
+        val details = "\nParsed value was: " + currentElem.toString
+        val diag = new AssertionFailed(context.schemaFileLocation, start, message, Some(details))
 
 Review comment:
   Will do, I simply forgot about the One() function.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services