Skip to content

Close Logger-owned files when creation fails - #174

Open
OskarEichler wants to merge 1 commit into
ruby:masterfrom
OskarEichler:codex/close-failed-logfile
Open

Close Logger-owned files when creation fails#174
OskarEichler wants to merge 1 commit into
ruby:masterfrom
OskarEichler:codex/close-failed-logfile

Conversation

@OskarEichler

Copy link
Copy Markdown

create_logfile can open a Logger-owned file and then raise during header, binmode or setup work, leaving the new descriptor open. Track successful completion and close the owned file on every failed exit while preserving the original exception. Current suites pass 64 tests / 323 assertions on Ruby 4.0.6 and 3.2.11; injected creation/header/setup failure models pass. No repository tests were changed.

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