Change recoverable errors to validation errors instead of schema definition warnings#863
Merged
stevedlawrence merged 1 commit intoOct 24, 2022
Conversation
…nition warnings A dfdl:assert with failureType="recoverableError" currently results in a schema definition warning. However, SDW's are usually used for things that can be safely ignored, while these asserts are generally used for validation checking beyond the capabilities of XSD that should not be ignored, or should at least be treated differently than warnings so that a user can easily differentiate between the two. This modifies these recoverable errors to become validation errors, accessible just like those created when validation is turned on. This also refactors the handling of errors to avoid duplication between assert expressions and assert patterns, as well as changes to make error messages more consistent. Note that this is a non-backwards compatible change, but is arguably the more correct behavior since these asserts really are predominantly used for more complex validation checks. DAFFODIL-2357
e8d0c79 to
2aed244
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A dfdl:assert with failureType="recoverableError" is currently treated as a schema definition warning. However, SDW's are usually for things that can be safely ignored, and these asserts are generally used for validation checking beyond the capabilities of XSD that should not be ignored, or should at least be treated differently so that a user can easily differentiate between the two.
This modifiers these asserts so that the errors are turned validation errors accessible just like those created when validation is turned on. This also refactors the handling of errors to avoid duplication between assert expressions and assert patterns, as well as changes to make error messages consistent.
Note that this is backwards incompatible change, but is arguably the more correct behavior since these asserts really are predominantly used for extended validation checks.
DAFFODIL-2357