jadams-tresys commented on a change in pull request #176: Add better error
message for '/' vs 'div'
URL: https://github.com/apache/incubator-daffodil/pull/176#discussion_r252010383
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/dpath/DFDLExpressionParser.scala
##########
@@ -235,6 +242,7 @@ class DFDLPathExpressionParser[T <: AnyRef](qn: NamedQName,
})("add")
def MultiplicativeExpr: Parser[Expression] = log(
+ UnaryExpr ~ (("/") ~ UnaryExpr) ^^ { _ => context.SDE("'/' is not a valid
operator in DFDL Expression Syntax. Did you mean to use 'div'?") } |
Review comment:
That's kind of what I was leaning towards too, but figured I would see if
there was a reasonably simple way to add this kind of helpful error message.
I'll see if I can find the bug for better diagnostics and I'll mark the ticket
for / vs div as a duplicate or something.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services