mbeckerle commented on code in PR #917:
URL: https://github.com/apache/daffodil/pull/917#discussion_r1073992455
##########
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/TypeCalculator.scala:
##########
@@ -176,17 +176,17 @@ class KeysetValueTypeCalculatorUnordered(valueMap:
HashMap[DataValuePrimitive, D
if (valueMap.contains(x)) {
valueMap.get(x) match {
case Some(a) => (a, Maybe.Nope)
- case None => (DataValue.NoValue, One(s"Value ${x} not found in
keyset-value mapping"))
+ case None => (DataValue.NoValue, One(s"Value ${x} not found in
enumeration key-value mapping"))
}
} else {
- (DataValue.NoValue, One(s"Key ${x} not found in keyset-value mapping"))
+ (DataValue.NoValue, One(s"Key ${x} not found in enumeration key-value
mapping"))
}
}
override def outputTypeCalc(x: DataValuePrimitive, xType: NodeInfo.Kind):
(DataValuePrimitiveNullable, Maybe[Error]) = {
unparseMap.get(x) match {
case Some(v) => (v, Maybe.Nope)
- case None => (DataValue.NoValue, One(s"Value ${x} not found in
keyset-value mapping"))
+ case None => (DataValue.NoValue, One(s"Value ${x} not found in
enumeration key-value mapping"))
Review Comment:
You can stick "(keyset-value mapping)" at the end of the messages to
maintain backward compatibility with past message-based tests maybe. So long as
this isn't needed to understand the primary diagnostic message. I agree with SL
that this should mention enumeration, mention dfdlx:repValues (I would not
search for the dfdlx prefix in tests though since that's likely to go away some
day), and mention being unable to determine the repValue for the unrecognized
enumeration value for unparsing.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]