You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2023/01/19 16:22:01 UTC
[GitHub] [daffodil] jadams-tresys commented on a diff in pull request #917: Improved diagnostic message for enumeration invalid key/value
jadams-tresys commented on code in PR #917:
URL: https://github.com/apache/daffodil/pull/917#discussion_r1081514318
##########
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:
As far as I can tell, the only place referencing the keyset-mapping error message is like 2 tests in P8, which I was about to update anyway with some small changes from SBSA, so I'll just update the tests there. None of the other schemas in the regression test repo reference that error message.
--
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: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org