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

std: Modify TempDir to not fail on drop. Closes #12628 #14215

Closed
wants to merge 1 commit into from

Conversation

brson
Copy link
Contributor

@brson brson commented May 15, 2014

After discussion with Alex, we think the proper policy is for dtors to not fail. This is consistent with C++ best practice, which has the same double-failure semantics. BufferedWriter already does this, so this patch modifies TempDir to not fail in the dtor, adding a close method for handling errors on destruction.

After discussion with Alex, we think the proper policy is for dtors
to not fail. This is consistent with C++. BufferedWriter already
does this, so this patch modifies TempDir to not fail in the dtor,
adding a `close` method for handling errors on destruction.
@brson
Copy link
Contributor Author

brson commented May 15, 2014

@aturon This issue is about a library policy matter you may be interested in.

@lilyball
Copy link
Contributor

std::io::fs::test has its own implementation of TempDir, for some reason, that fails on Drop.

@klutzy
Copy link
Contributor

klutzy commented May 15, 2014

Does this fix #10462 too?

@brson
Copy link
Contributor Author

brson commented May 15, 2014

@klutzy I think it does not.

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.

4 participants