Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T5385: catch correct errors in Xml_light Xml.parse_file #18

Merged
merged 1 commit into from Jul 21, 2023

Conversation

jestabro
Copy link
Contributor

@jestabro jestabro commented Jul 21, 2023

The Xml_light package exposes exceptions in the xml.mli file of types Xml.Error/Xml.File_not_found, however, when matching on errors raised by Xml.parse_file, one needs to catch types Xml_light_errors.Xml_error/Xml_light_errors.File_not_found.

@jestabro jestabro requested a review from dmbaturin July 21, 2023 03:33
@jestabro jestabro self-assigned this Jul 21, 2023
Copy link
Member

@dmbaturin dmbaturin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the time I assumed that it would never receive invalid files since schema verification is done before parsing and XML files were only used in the build process. Now it's a fair point.

@dmbaturin dmbaturin merged commit c586302 into vyos:master Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants