tuxji commented on a change in pull request #488:
URL: https://github.com/apache/incubator-daffodil/pull/488#discussion_r575694176
##########
File path: daffodil-runtime2/src/main/resources/examples/NestedUnion.c
##########
@@ -379,7 +380,8 @@ data_unparseSelf(const data *instance, UState *ustate)
bar_unparseSelf(&instance->bar, ustate);
break;
default:
- ustate->error_msg = "node's _choice field was not initialized during
unparsing";
+ ustate->error_msg =
+ "Unparse error: no match between choice dispatch key and any
branch key";
Review comment:
If we implement a choice branch resolver in c-runtime2, I think we would
call it in walkInfosetNode() because the resolver needs to peek at the next XML
element and walkInfosetNode() reads the XML file's data into infoset member
fields. We probably should call a getChoice() function in unparseSelf()
instead of accessing the _choice member field in case we want to remove the
_choice member field from C structs.
----------------------------------------------------------------
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:
[email protected]