Skip to content

2026PKUCourseHW5:is_open() check #357

Closed
contersss wants to merge 1 commit into
abacusmodeling:developfrom
contersss:debug
Closed

2026PKUCourseHW5:is_open() check #357
contersss wants to merge 1 commit into
abacusmodeling:developfrom
contersss:debug

Conversation

@contersss
Copy link
Copy Markdown

The original code did not check whether a file was successfully opened before attempting to read from it. If the file failed to open, the program would continue silently. Added an is_open()check immediately after attempting to open the file. If the file is not open, the program now throws a clear, descriptive error and exits gracefully.

@contersss contersss closed this Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant