-
-
Notifications
You must be signed in to change notification settings - Fork 897
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: aggregate libxml2 errors into a single exception
In places (like document parsing) where it's possible for libxml2 to emit multiple warnings and errors, aggregate these libxml2 errors into a single exception so users can see all the problems. Previously, we were grabbing the most recent "error" which might just be a warning and not the fatal error preventing parsing from completing. This was misleading and hid the source of the real problem. Now, if there are multiple errors, they're aggregated into a single Nokogiri::XML::SyntaxError with a message like: Multiple errors encountered: WARNING: text of warning message ERROR: text of error message WARNING: text of second warning message Note that I've also renamed some internal C functions to try to incrementally get consistent with naming. Closes #2562
- Loading branch information
1 parent
75ab97d
commit d614157
Showing
15 changed files
with
262 additions
and
234 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.