stevedlawrence opened a new pull request, #1228: URL: https://github.com/apache/daffodil/pull/1228
Currently, restriction validation logic takes place in a finally block of the ElementParserBase combinator when the parse status is "success". However, if an exception is thrown (e.g. Runtime SDE) then we stil hit this finally block, parse status could still be "success", but we likely won't have any data to validate. This can lead to a confusing exception that hides the original exception. To fix this, this moves validation to the end of the try block, so that we only ever attempt validation if all aspects of a parse succeed. And if an exception is thrown, then this code is simply skipped. This also modifies the TDML runner so it correctly sets validationMode even when errors are expected. This allows us to test this case where we expect a Runtime SDE error when validation is enabled. DAFFODIL-2895 -- 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]
