Skip to content

XML error handling code in utils.js is never reached #547

Description

@simon-20

Brief Description
In utils.js, there is code in the execXmllint function which raises an exception if xmllint returns an error code when parsing the XML. However, it appears that this code will never be reached, because xmllint is called with the --recover option, and this option means that xmllint always returns 0/success. This error handling code should be removed to avoid confusion for developers down the line.

There is also code in validatorServices.js to handle the exception raised by the xmllint error handling code above (the code which should raise an exception, but which in fact will never do so). This will never be reached when parsing errors are encountered, since the exception will never be thrown. It may, however, be reached if for whatever reason Node was unable to start xmllint, so this exception handling code may not be safe to remove.

Severity
Low

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions