-
Notifications
You must be signed in to change notification settings - Fork 527
rust: handle I/O errors in process_word_file (fixes #1990) #1991
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
rust: handle I/O errors in process_word_file (fixes #1990) #1991
Conversation
c48b245 to
7e6b338
Compare
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 477307e...:
Your PR breaks these cases:
Congratulations: Merging this PR would fix the following tests:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Check the result page for more info. |
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit 477307e...:
Your PR breaks these cases:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Check the result page for more info. |
|
Merge conflicts and a leftover commented out line - please update this PR, thanks. |
cfsmp3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment
7e6b338 to
ab08bff
Compare
|
done |
|
This PR still has merge conflicts. Please rebase on master to resolve them. git fetch origin
git rebase origin/master
# resolve any conflicts
git push --force-with-leaseThanks! |
|
Closing - this issue is now fixed by #2036 which takes a simpler approach (using |
[FIX] Fix #1990: Handle I/O errors in Rust word file parser
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
Description
This Pull Request addresses a stability issue in the Rust-based parser where the application would panic and terminate if it encountered a reading error in an external word file (such as a capitalization or profanity list).
Changes:
process_word_fileinsrc/rust/src/parser.rs: Replaced the.unwrap()call onreader.lines()with an explicitmatchstatement.Err, prints a descriptive message tostderrincluding the line number and filename, and usescontinueto proceed with the rest of the file.This ensures that a single corrupted line or an I/O hiccup does not interrupt the entire extraction process, making the tool significantly more robust for automated workflows.
Related Issue
Fixes #1990
Checklist
cargo check.docs/CHANGES.TXTwith a brief description of the fix.